I have an Array<Person> myArray and I am using the following code
myArray.Find(o => o.name.Equals("John"));
This article in Msdn states:
Return Value
Type: T
The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type T.
If I had an Array<int> the default value would be zero.
But, in my case I am using a class. Let's say Array<Person>.
What would be the default for my class and how can I handle the not found case using a delegate?