L
Lit
Hi,
Can someone explain this:
<this is from Using generic- By Ludwig Stuyck>
string nameToFind = "Ludwig Stuyck";
PersonNameFilter personNameFilter = new PersonNameFilter(nameToFind);
// Create a new predicate, that uses the FilterByName method to determine
whether the person has been found
Predicate<Person> filterByName = new
Predicate<Person>(personNameFilter.FilterByName);
// Find the person in the collection
Person foundPerson = persons.Find(filterByName);
?? Are we passing a method to a method or what
?? is this similar to anonymous methods.
?? can not see the fully understand it or see the full power yet, but I
know/heard it is very powerful
Thanks
Lit.
Can someone explain this:
<this is from Using generic- By Ludwig Stuyck>
string nameToFind = "Ludwig Stuyck";
PersonNameFilter personNameFilter = new PersonNameFilter(nameToFind);
// Create a new predicate, that uses the FilterByName method to determine
whether the person has been found
Predicate<Person> filterByName = new
Predicate<Person>(personNameFilter.FilterByName);
// Find the person in the collection
Person foundPerson = persons.Find(filterByName);
?? Are we passing a method to a method or what
?? is this similar to anonymous methods.
?? can not see the fully understand it or see the full power yet, but I
know/heard it is very powerful
Thanks
Lit.