本文介绍了谓语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 有人可以解释一下: <这是来自使用泛型 - 作者:Ludwig Stuyck> string nameToFind =" Ludwig Stuyck" ;; PersonNameFilter personNameFilter = new PersonNameFilter(nameToFind); //创建一个新谓词,使用FilterByName方法确定 是否找到了该人 谓词< PersonfilterByName = new Predicate< ; Person>(personNameFilter.FilterByName); //查找集合中的人物 Person foundPerson = persons.Find(filterByName) ; ??我们是将方法传递给方法还是什么 ??这类似于匿名方法。 ??无法看到完全理解它或看到全部功率,但我知道/听说它是非常强大的 谢谢 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 determinewhether the person has been found Predicate<PersonfilterByName = newPredicate<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 Iknow/heard it is very powerful Thanks Lit.推荐答案 这篇关于谓语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-26 21:28