Uri.op_Inequality Method
.NET Framework 3.0
Determines whether two Uri instances do not have the same value.
Namespace: System
Assembly: System (in system.dll)
Assembly: System (in system.dll)
Not applicable.
Parameters
- uri1
A Uri instance to compare with uri2.
- uri2
A Uri instance to compare with uri1.
Return Value
A Boolean value that is true if the two Uri instances are not equal; otherwise, false. If either parameter is a null reference (Nothing in Visual Basic), this method returns true.This example creates three Uri instances from strings and compares them to determine whether they represent the same value. Address2 and Address3 are not the same because Address3 contains a Query that is not found in Address2. The outcome is written to the console.
// Create some Uris. Uri address1 = new Uri("http://www.contoso.com/index.htm#search"); Uri address2 = new Uri("http://www.contoso.com/index.htm"); Uri address3 = new Uri("http://www.contoso.com/index.htm?date=today"); // The first two are equal because the fragment is ignored. if (address1 == address2) Console.WriteLine("{0} is equal to {1}", address1.ToString(), address2.ToString()); // The second two are not equal. if (address2 != address3) Console.WriteLine("{0} is not equal to {1}", address2.ToString(), address3.ToString());
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.