Vincent

Vincent

  • NA
  • 1
  • 0

list access

Jul 21 2009 2:53 PM


How can i access a list element by "name".
 
I know how to make a Find, but I think it;s more neat to do it another way.
 
List m_list = new List();
.. populate list ...
Level l = List[0]; //this one works, i know. standard
l = list["final"];    //how about this one? assume Level class has a Property Name, or a private member.
 
This is much more workable than List.Find (lamda);
 
I know List can;t do it, but perhaps a derived version, or create my own iterator... that will accpet more than just index