GetHashCode

NullableBool.GetHashCode method

Returns a hash code value for the instance of the NullableBool class.

public override int GetHashCode()

Return Value

returns a hash code value for this object.

Examples

Shows how to work with <see cref=“Aspose.Tasks.NullableBool” />.GetHashCode method.

var bool1 = new NullableBool(true);
var bool2 = new NullableBool(true, false);

// the hash code of bools is based on 'IsDefined' and 'Value' properties
Console.WriteLine("Bool 1: {0} Hash Code 1: {1}", bool1.ToString(), bool1.GetHashCode());
Console.WriteLine("Bool 2: {0} Hash Code 1: {1}", bool2.ToString(), bool2.GetHashCode());

See Also