Warning: Undefined array key 0 in /www/wwwroot/w/show/success.php on line 266
Warning: Trying to access array offset on value of type null in /www/wwwroot/w/show/success.php on line 266
Warning: Undefined array key 0 in /www/wwwroot/w/show/success.php on line 266
Warning: Trying to access array offset on value of type null in /www/wwwroot/w/show/success.php on line 266
10.6 匿名方法与lambda表达式
**本节视频教学录像:2分钟**
C#中的匿名方法是在C# 2.0引入的,它终结了C# 2.0之前版本声明委托的唯一方法是使用命名方法的时代。在 C# 3.0 及更高版本中,Lambda 表达式取代了匿名方法,作为编写内联代码的首选方式。但是,匿名方法的信息同样也适用于 Lambda 表达式,可以说 Lambda 表达式就是匿名方法演变过来的。匿名方法可以用来忽略参数列表,可以转换为具有各种签名的委托,而这对于 Lambda 表达式来说是不可能的。与此同时,学好匿名方法,才能更加深刻地理解 Lambda 表达式。
Warning: Undefined array key 0 in /www/wwwroot/w/show/success.php on line 276
Warning: Trying to access array offset on value of type null in /www/wwwroot/w/show/success.php on line 276
Warning: Undefined array key 0 in /www/wwwroot/w/show/success.php on line 276
Warning: Trying to access array offset on value of type null in /www/wwwroot/w/show/success.php on line 276