I have an arraylist of objects (custom classes) that I want to be able to locate items in and possibly remove it. So I have a class that has about a dozen of different properties of different types. What I want to be able to do is locate one of the class instances in my list based on one of these properties (always the same, and guaranteed to have unique values) let's call this property ID and assume that it is of type String. So I want to do something like this:
list<CMyCustomClass> classList = new <CMyCustomClass>();
string idToFind = "ID_12";
How do I go about implementing something like that? Overwrite the Contains and Remove methods? If yes, how?