Hi all,
to simplify my problem, I'll use a quick example.
Imagine I have a class of 'Cat' which has accessors for things like 'name', 'colour' and 'height'.
I then put these cats in a list
List<Cat^>^ catList;
I want to be able to search this list based on the properties of the cats. e.g. "Find me the cat called 'Ginger'".
I wish to use the List<T>::Find Method to perform this search.
http://msdn.microsoft.com/en-us/library/x0b5b5bc(v=VS.90).aspx
Something along the lines of this c# line, but in c++.net
String catName = "Ginger";
Cat myLocatedCat = catList.Find(delegate(Cat c) {return c.Name == catName; });
I tried to do something like this, but VS really wasn't happy with the delegate stuff. Clearly doing something wrong.
Any help - as always - will be greatly appreciated.