日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > C# >内容正文

C#

c# uri.host_C#| Uri.GetLeftPart()方法与示例

發(fā)布時間:2023/12/1 C# 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c# uri.host_C#| Uri.GetLeftPart()方法与示例 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

c# uri.host

Uri.GetLeftPart()方法 (Uri.GetLeftPart() Method)

Uri.GetLeftPart() method is an instance method that is used to get a specified part from the given URI based on passed UriPartial enum.

Uri.GetLeftPart()方法是一個實例方法,用于基于傳遞的UriPartial枚舉從給定URI中獲取指定部分。

Syntax:

句法:

string Uri.GetLeftPart (UriPartial Part);

Parameter(s):

參數(shù):

  • Part – represents UriPartial to get specified part from Uri.

    零件 –表示從Uri獲取指定零件的UriPartial。

Return value:

返回值:

The return type of this method is string, it returns string value to represent specified part of Uri.

該方法的返回類型為string ,它返回表示Uri指定部分的字符串值。

Exception:

例外:

System.ArgumentException;System.InvalidOperationException;

Example to demonstrate example of Uri.GetLeftPart() method

演示Uri.GetLeftPart()方法示例的示例

using System;class UriExample {//Entry point of Programstatic public void Main(){// Create an object of UriUri Address;Address = new Uri("https://www.includehelp.com/index.html#search");Console.WriteLine(Address.GetLeftPart(UriPartial.Authority));Console.WriteLine(Address.GetLeftPart(UriPartial.Path));Console.WriteLine(Address.GetLeftPart(UriPartial.Query));Console.WriteLine(Address.GetLeftPart(UriPartial.Scheme));} }

Output

輸出量

https://www.includehelp.com https://www.includehelp.com/index.html https://www.includehelp.com/index.html https://

翻譯自: https://www.includehelp.com/dot-net/uri-getleftpart-method-with-example.aspx

c# uri.host

總結(jié)

以上是生活随笔為你收集整理的c# uri.host_C#| Uri.GetLeftPart()方法与示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。