日期:2014-05-16 浏览次数:21129 次
struct key : IEquatable<key>
{
public double key1;
public double key2;
public override int GetHashCode()
{
return key1.GetHashCode() ^ key2.GetHashCode();
}
public override bool Equals(object obj)
{
return Equals((key)obj);
}
public bool Equals(key other)
{
return key1 == other.key1 && key2 == other.key2;
}
}
System.Collections.Generic.Dictionary<key, double>