读物推荐
If want filter out a price greater than $10 ,in the products. we need to loop around,testing each element and printing it out where appropriate.
The dependency is obvious because of the nesting.
In particular, it makes it very easy to change the condition we're testing for and the aciton we take on each of the matchs independently.
* The FindAll and ForEach methods in C#2.0 just help to encourage you to consider separation of concerns.
That's a bit better, But it is getting in the way Developer , and adding noise to the code, which hurts readability. I still prefer the C#1.1 version.
昵称: [登录] [注册]
主页:
邮箱:(仅博主可见)
验证码: 看不清,换一个
评论内容:
登录 注册
[使用Ctrl+Enter键快速提交评论]