October 2006 Entries

Check whether a List contains any object having a certain property value....

All what I had to do was to check whether , my List<> object contains any object with a SelectedDate (a property of the object) having a certain value. And I did not want to loop in the List and find out . (tomorrow there may be 10000 items in my list , and a loop would be very very slow). I found that a List exposes a property called Exits() which can do the trick for me ..... static void Main(string[] args) { List<Dinosour> _DinoList = new List<Dinosour>(); Dinosour d1 = new Dinosour();...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati