I have a class
class Person {
int Age;
string Name;
}
List<Person> pList = new List<Person>();
pList.Exists(p=> p.Name == "testName"); <-- need an alternative for this.
I'm using .net 3.0.
As such I don't have access to getFirstOrDefault
method.
The Exists
method throws an exception for null values, but I don't want to interrupt my program flow; is there any other alternative?
I don't have Any
or Linq
available either.