سلام بر برنامه نویسان عزیز ایران زمین 😉 در این مطلب از وب سایت پروگرم 98 آموزش استفاده از Uri و نمایش Host و Port و Scheme و Local Path و Query در سی شارپ #C را آماده کردم. انشاالله که این آموزش برای شما مفید باشد.
خروجی کد به این صورت می باشد :
Host: www.yoursite.com
Port: 80
Scheme: http
Local Path: /somefile.txt
Query: ?SomeQuery
Path and query: /somefile.txt?SomeQuery
Port: 80
Scheme: http
Local Path: /somefile.txt
Query: ?SomeQuery
Path and query: /somefile.txt?SomeQuery
کد استفاده از Uri و نمایش Host و Port و Scheme و Local Path و Query در سی شارپ #C :
using System;
using System.Net;
class MainClass {
public static void Main() {
Uri sample = new Uri("http://www.yoursite.com/somefile.txt?SomeQuery");
using System.Net;
class MainClass {
public static void Main() {
Uri sample = new Uri("http://www.yoursite.com/somefile.txt?SomeQuery");