I have a class called Question. I have another class called Questions which is simply an inheritance of List creating a collection.
How can I make it so I can retrieve a Question object by it’s ID property instead of the integer based index like this?:
Question q = Questions["someidhere"];
Basically I’m looking for the same functionality as a SqlDataReader object where you can retrieve a field based on the field name OR the index.
Don’t use a
List<T>at all; use aDictionary<K,V>