GetHashCode() public method

Returns a hash code for this instance.
public GetHashCode ( ) : int
return int
示例#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());
 }
示例#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());
 }