コード例 #1
0
ファイル: Disk.cs プロジェクト: arcinxe/ArktinMonitor
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Letter != null ? Letter.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TotalSpaceInGigaBytes.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
ファイル: Disk.cs プロジェクト: arcinxe/ArktinMonitor
 public bool Equals(BasicDisk other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Letter, other.Letter) && string.Equals(Name, other.Name) && TotalSpaceInGigaBytes.Equals(other.TotalSpaceInGigaBytes));
 }