GetHashCode() public method

Returns a hash code for this instance.
public GetHashCode ( ) : int
return int
Exemplo n.º 1
0
 public void Test_HashCode_NotEquals()
 {
     var test = new WorkGroup(Name, 1, 10);
     var test2 = new WorkGroup("Another Name", 50, 50);
     Assert.NotEqual(test.GetHashCode(), test2.GetHashCode());
 }
Exemplo n.º 2
0
 public void Test_HashCode_Equals()
 {
     var test = new WorkGroup(Name, 1, 10);
     var test2 = new WorkGroup(Name, 50, 50);
     Assert.Equal(test.GetHashCode(), test2.GetHashCode());
 }