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# | Uri.IsHexEncoding() Method
- C# | PadLeft() Method
- Anonymous Method in C#
- DateTimeOffset.Add() Method in C#
- Method Hiding in C#
- Stack.Contains() Method in C#
- C# | IndexOfAny() Method
- C# | Method Overloading
- C# | Math.Max() Method
- Extension Method in C#
- C# | Math.Min() Method
- C# | Uri.FromHex() Method
- C# | Math.Log() Method
- DateTime.Add() 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 email@example.com. 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.