Subscription sub = new Subscription();
sub.Appname = subName;
if (this.Subscriptions.Contains(sub,new SubcriptionComparer<Subscription>()))
return true;
else
return false;
class SubcriptionComparer<T> : IEqualityComparer<T>
where T : Subscription
{
public int GetHashCode(T obj)
{
return obj.GetHashCode();
}
public bool Equals(T t1, T t2)
{
return t1.Appname == t2.Appname;
}
}