...一个非常小的局部,或者如上面两个例子那样需要把抽象的处理作为一个参数传递给其他逻辑调用,那么匿名方法(Anonymous Method)是个很不错的选择。此外,匿名方法结合反射会大大提升公共库的灵活性。
基于225个网页-相关网页
These all accept a delegate, usually in the form of an anonymous method.
这些操作都可以接受一个委托,一般可以使用匿名方法的方式来传递。
Editing an anonymous method or any method that contains an anonymous method.
编辑匿名方法或任何包含匿名方法的方法。
This method takes a new client object and an anonymous method that holds the same code a normal using block would contain.
方法接收一个新的客户端对象,以及一个匿名方法,该方法持有的代码与正常使用using语句块包含的代码完全相同。
应用推荐