コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (FriendlyName != null ? FriendlyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ RemoteHostId.GetHashCode();
         hashCode = (hashCode * 397) ^ (LocalIp != null ? LocalIp.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #2
0
 public bool Equals(ServerInfo other)
 {
     return(string.Equals(FriendlyName, other.FriendlyName) && RemoteHostId.Equals(other.RemoteHostId) && Equals(LocalIp, other.LocalIp));
 }