Hi,
Can someone explain this:
<this is from Using generic- By Ludwig Stuyck>
string nameToFind = "Ludwig Stuyck";
PersonNameFilte r personNameFilte r = new PersonNameFilte r(nameToFind);
// Create a new predicate, that uses the FilterByName method to determine
whether the person has been found
Predicate<Perso nfilterByName = new
Predicate<Perso n>(personNameFi lter.FilterByNa me);
// Find the person in the collection
Person foundPerson = persons.Find(fi lterByName);
?? 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";
PersonNameFilte r personNameFilte r = new PersonNameFilte r(nameToFind);
// Create a new predicate, that uses the FilterByName method to determine
whether the person has been found
Predicate<Perso nfilterByName = new
Predicate<Perso n>(personNameFi lter.FilterByNa me);
// Find the person in the collection
Person foundPerson = persons.Find(fi lterByName);
?? 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.
Comment