コード例 #1
0
ファイル: Language.cs プロジェクト: hgarcia/gherkineditor
 public override int GetHashCode()
 {
     unchecked
     {
         int result = IsoCode.GetHashCode();
         result = (result * 397) ^ English.GetHashCode();
         result = (result * 397) ^ Native.GetHashCode();
         return(result);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = DisplaySymbol.GetHashCode();
         hashCode = (hashCode * 397) ^ (IsoCode != null ? IsoCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ SymbolFirst.GetHashCode();
         hashCode = (hashCode * 397) ^ (CurrencySymbol != null ? CurrencySymbol.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DecimalDigits;
         hashCode = (hashCode * 397) ^ (DecimalSeparator != null ? DecimalSeparator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (GroupSeparator != null ? GroupSeparator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ExampleFormat != null ? ExampleFormat.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         // Derived from https://stackoverflow.com/a/5060059
         int hashCode = base.GetHashCode();
         hashCode *= 397;
         hashCode += IsoCode?.GetHashCode() ?? 0;
         hashCode *= 397;
         hashCode += EthnologueCode?.GetHashCode() ?? 0;
         hashCode *= 397;
         hashCode += Name?.GetHashCode() ?? 0;
         return(hashCode);
     }
 }
コード例 #4
0
ファイル: Currency.Equality.cs プロジェクト: shadowca/nmoneys
 public override int GetHashCode()
 {
     // it is ok to use writable IsoCode as it is assigned once at initialization
     return(IsoCode.GetHashCode());
 }
コード例 #5
0
 public override int GetHashCode() => IsoCode.GetHashCode();
コード例 #6
0
ファイル: Country.cs プロジェクト: tvilkov/csharp-gists
 public override int GetHashCode()
 {
     return(IsoCode.GetHashCode());
 }