Uri.ReferenceEquals() Method is used to check the reference of two specified objects. This method can be overridden and static in nature. So, if a user is going to test the two objects references for equality and he is not sure about the implementation of the Equals method, then he can call the ReferenceEquals method.
Syntax: bool Uri.ReferenceEquals (Uri uri1, Uri uri2);
uri1: It is the first uri to compare.
uri2: It is the second uri to compare.
Return Value: This method returns true if reference of two objects are equal otherwise it returns false.
Below programs illustrate the use of Uri.ReferenceEquals() Method:
null is equal to null
http://www.geeksforgeeks.org/index.htm is not equal to http://www.geeksforgeeks.org/index.htm is equal to http://www.geeksforgeeks.org/index.htm http://www.geeksforgeeks.org/index.htm is not equal to
Note: Here, null will never be printed in the output.