本文整理汇总了C#中System.Collections.Generic.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# System.Collections.Generic.GetHashCode方法的具体用法?C# System.Collections.Generic.GetHashCode怎么用?C# System.Collections.Generic.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.Generic
的用法示例。
在下文中一共展示了System.Collections.Generic.GetHashCode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getConcreteHash
protected override int getConcreteHash()
{
var anonomousType = new
{
f1 = Rarity,
f2 = MapLevel,
f3 = MapQuantity,
};
return anonomousType.GetHashCode();
}
示例2: getConcreteHash
protected override int getConcreteHash()
{
var anonomousType = new
{
f1 = Quality,
f2 = this.Requirements != null ? string.Join(string.Empty, this.Requirements.Select(r => string.Concat(r.Name, r.Value)).ToArray()) : string.Empty,
f3 = Color,
f4 = Socket
};
return anonomousType.GetHashCode();
}
示例3: getConcreteHash
protected override int getConcreteHash()
{
var anonomousType = new
{
f1 = Sockets != null ? string.Join(string.Empty, Sockets.Select(s => string.Concat(s.Group, s.Attribute)).ToArray()) : string.Empty,
f2 = Implicitmods != null ? string.Join(string.Empty, Implicitmods.ToArray()) : string.Empty,
f3 = Rarity.ToString(),
f4 = this.Requirements != null ? string.Join(string.Empty, this.Requirements.Select(r => string.Concat(r.Name, r.Value)).ToArray()) : string.Empty,
f5 = this.GearType.ToString()
};
return anonomousType.GetHashCode();
}
示例4: getHash
protected int getHash()
{
var anonomousType = new
{
f = this.IconURL,
f1 = this.League,
f2 = this.Name,
f3 = this.TypeLine,
f4 = this.DescrText,
f5 = this.Explicitmods != null ? string.Join(string.Empty, this.Explicitmods.ToArray()) : string.Empty,
f6 = this.Properties != null ? string.Join(string.Empty, this.Properties.Select(p => string.Concat(p.DisplayMode, p.Name, string.Join(string.Empty, p.Values.Select(t => string.Concat(t.Item1, t.Item2)).ToArray()))).ToArray()) : string.Empty,
f7 = getConcreteHash()
};
return anonomousType.GetHashCode();
}