NullableBoolGetHashCode Method

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

Namespace:  Aspose.Tasks
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public override int GetHashCode()

Return Value

Type: Int32
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