Compare 2 instances of the class SubComponent
public class SubComponentSequenceComparer : IEqualityComparer
{
public bool Equals(SubComponent x, SubComponent y)
{
return x.Sequence == y.Sequence;
}
public int GetHashCode(SubComponent obj)
{
return obj.Sequence.GetHashCode();
}
}
No comments:
Post a Comment