for (int i = 0; i < originalentitycollection.Count; i++)
{
Predicateexist = delegate(Model.Person match)
{
if (match.PersonId == originalentitycollection[i].PersonId)
return true;
else return false;
};
if (!distinctpersoncollection.exists(exist))
{
distinctpersoncollection.add(originalentitycollection[i]);
}
}
You can visit MSDN for more information about the predicate delegates:
http://msdn2.microsoft.com/en-us/library/bfcke1bz.aspx
No comments:
Post a Comment