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.
==>生活博客(Life in Coding)<== 我的格言(原创) 面试时:要表现出最光鲜的一面 做事时:要表现出最实在的一面 荣誉时:要表现出最低调的一面 育人时:要表现出最真诚的一面 商议时:要表现出最坦诚的一面