C# Need to understand some of the technical (C# 需要懂的一些技术)
2012-06-19 10:19
381 查看
1. Anonymous Methods (匿名方法)
2. Lambda Expression (Lambda表达式)
-----------------------------------
悠然忆人记相思 如果觉得这篇文章对您有所帮助,请留下您的评论,谢谢.
//example 1 delegate int MyAnonymityFunction(); private void CommonFunction() { MyAnonymityFunction fun = delegate { return 7; } //anonymityValue value is 7 int anonymityValue = fun(); } //example 2 this.Button1.Click += delegate { //input code }
2. Lambda Expression (Lambda表达式)
List<int> listInt = new List<int>(){1,2,3,4,5,6,7,8}; //listEven value is 2,4,6,8 List<int> listEven = listInt.FindAll(i => i%2 == 0);
-----------------------------------
悠然忆人记相思 如果觉得这篇文章对您有所帮助,请留下您的评论,谢谢.
相关文章推荐
- The target assembly contains no service types. You may need to adjust the Code Access Security policy of this assembly." 目标程序集不包含服务类型。可能需要调整此程序集的代码访问安全策略。
- [Java][DB][Cassandra] some useful link to understand the concepts of SSTable
- 3.You need to extract details of those products in the SALES table where the PROD_ID column contains
- WCF to some extent violates the principle of SOA
- failed to sync branch You might need to open a shell and debug the state of this repo
- C# How to get the system drive of remote server
- Github出现failed to sync branch You might need to open a shell and debug the state of this repo的解决方法
- These kinds of timepieces are usually far better cloned as compared to some other timepieces because of the sought after and also reputation
- failed to sync branch You might need to open a shell and debug the state of this repo
- 22.You need to create a table for a banking application. One of the columns in the table has the fol
- failed to sync branch You might need to open a shell and debug the state of this repo
- In C# how to find the mime type of a file
- how to get the space size of some tables in one database?
- EF 6.0 The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. c#中的时间
- IOS 推送警告but you still need to add "remote-notification" to the list of ....
- failed to sync branch You might need to open a shell and debug the state of this repo.
- failed to sync branch You might need to open a shell and debug the state of this repo
- failed to sync branch You might need to open a shell and debug the state of this repo
- Why there are a lot of technical personnel is not willing to write a blog?--为什么有很多技术人员不愿写博客?
- C#操作mysql数据库 unable to connect to any of the specified mysql hosts