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

歡迎訪問 生活随笔!

生活随笔

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

C#

c# uri.host_C#| 具有示例的Uri.Equality()运算符

發布時間:2023/12/1 C# 60 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c# uri.host_C#| 具有示例的Uri.Equality()运算符 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

c# uri.host

Uri.Equality()運算符 (Uri.Equality() Operator)

Uri.Equality() Operator is overloaded which is used to compare two Uri objects. It returns true if two Uri objects contain the same Uri otherwise it returns false.

Uri.Equality()運算符已重載,該運算符用于比較兩個Uri對象。 如果兩個開放的對象包含相同的URI否則返回false返回true。

Syntax:

句法:

bool operator == (Uri uri1, Uri uri2);

Parameter(s):

參數:

  • Uri uri1 – represents the first Uri to be compared.

    Uri uri1 –表示要比較的第一個Uri。

  • Uri uri2 – represents the second Uri to be compared.

    Uri uri2 –表示要比較的第二個Uri。

Return value:

返回值:

The return type of this method is Boolean, it returns true if the Uri instances are the same; otherwise, false.

此方法的返回類型為Boolean ,如果Uri實例相同,則返回true;否則,返回true 。 否則為false

Example to demonstrate example of Uri.Equality() Operator

演示Uri.Equality()運算符示例的示例

using System;class UriExample {//Entry point of Programstatic public void Main(){// Create some Uri objectsUri uri1 = new Uri("https://www.includehelp.com/");Uri uri2 = new Uri("https://www.includehelp.com/");Uri uri3 = new Uri("https://www.includehelp.com/index.html");if (uri1 == uri2)Console.WriteLine("uri1 and uri2 are equal");elseConsole.WriteLine("uri1 and uri2 are not equal");if (uri1 == uri3)Console.WriteLine("uri1 and uri3 are equal");elseConsole.WriteLine("uri1 and uri3 are not equal");} }

Output

輸出量

uri1 and uri2 are equal uri1 and uri3 are not equal

Reference: Uri.Equality(Uri, Uri) Operator

參考: Uri.Equality(Uri,Uri)運算符

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

c# uri.host

總結

以上是生活随笔為你收集整理的c# uri.host_C#| 具有示例的Uri.Equality()运算符的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。