hi, i just read about Predicate (http://developer.coreweb.com/articles/Default12.aspx)
i think it would be great if BusinessListBase and ReadOnlyListBase will implement the same methods as System.Collections.Generic.List<T> class implements.
for example:
public C Find(Predicate<C> match) { if (match == null) { throw new ArgumentNullException("match"); } for (int index = 0; index < base.Count; index++) { if (match(base[index])) { return base[index]; } } return default(C); } and this is a nice way of calling it. PersonList persons = PersonList.GetAllPersons()} Person me = persons.Find ( delegate(Person p) { return p.Name == "Tamir" } ) |
Copyright (c) Marimer LLC