110,549
社区成员
发帖
与我相关
我的任务
分享
public class DataItem<Type1, Type2>
{
public Type1 Text
{
get;
set;
}
public Type2 Value
{
get;
set;
}
public override bool Equals(object obj)
{
DataItem<Type1, Type2> other = obj as DataItem<Type1, Type2>;
if (other == null)
{
return false;
}
return Object.Equals(this.Text, other.Text) && Object.Equals(this.Value, other.Value);
}
}
重写下Equals