C# Guid Inequality
Description
Guid Inequality
indicates whether the values of two specified
Guid objects are not equal.
Syntax
Guid.Inequality
has the following syntax.
public static bool operator !=(
Guid a,
Guid b
)
Parameters
Guid.Inequality
has the following parameters.
a
- The first object to compare.b
- The second object to compare.
Returns
Guid.Inequality
method returns true if a and b are not equal; otherwise, false.
Example
Indicates whether the values of two specified Guid objects are not equal.
/*from w w w . j a v a2s . co m*/
using System;
public class Example
{
public static void Main()
{
// Create a GUID and determine whether it consists of all zeros.
Guid guid1 = Guid.NewGuid();
Console.WriteLine(guid1);
Console.WriteLine("Empty: {0}\n", guid1 != Guid.Empty);
}
}
The code above generates the following result.