由网友(卑微)分享简介:在LINQ有选择和地点的方法。我应该每个开发人员知道这两种方法(例如:当使用一个比其他任何优势比其他等)In linq there is the Select and Where methods. What should every developer know about these two methods (E...
在LINQ有选择和地点的方法。我应该每个开发人员知道这两种方法(例如:当使用一个比其他任何优势比其他等)
In linq there is the Select and Where methods. What should every developer know about these two methods (Example: when to use one over the other, any advantages over the other, etc)
推荐答案
其中,
查找匹配的项目,只返回那些做(过滤)。
finds items that match and only returns those that do (filtering).
- > 的IEnumerable< A>
中,的IEnumerable< A>
退出
选择
返回东西的所有的源代码中的项目(投影/转换)。的东西可能是项本身,但更通常是某种形式的投影
returns something for all items in the source (projection / transformation). That something might be the items themselves, but are more usually a projection of some sort.
- > 的IEnumerable< A>
中,的IEnumerable< B>
退出
相关推荐
最新文章