Uri.Equals(Object) Method is used to compare two Uri instances for equality.
public override bool Equals (object comparand);
Here, it takes the Uri instance or a URI identifier to compare with the current instance.
Return Value: This method returns a Boolean value true if the two instances represent the same URI otherwise, false.
Below programs illustrate the use of Uri.Equals(Object) Method:
address1 is Equals to address2
http://www.contoso.com/ is Equals to http://www.contoso.com/ http://www.google.com/ is not Equals to http://www.facebook.com/
- Difference between Method Overriding and Method Hiding in C#
- C# | ToUpper() Method
- C# | ToLower() Method
- C# | Uri.IsHexEncoding() Method
- DateTime.Add() Method in C#
- TimeSpan.Add() Method in C#
- C# | SortedDictionary.Add() Method
- C# | Copy() Method
- C# | CopyTo() Method
- C# | Trim() Method
- DateTimeOffset.Add() Method in C#
- Anonymous Method in C#
- C# | Method Overriding
- Stack.Contains() Method in C#
- Queue.Contains() Method in C#
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.