Introduction to Expression experience, Expression experience
There must be no stranger to the Expression feature in C #. There are many good articles on the Internet and garden. I don't think it is necessary to write some articles to introduce science, or from entry to proficiency.
This series of essays mainly share ideas, solutions to problems, and conscious and interesting discoveries during work and learning.
With Expression, we can write very elegant (at least personally think) code.
For example, In the ViewModel that students who develop WPF need to access every day,
OnPropertyChanged () => Name );
Aspect Ratio
OnPropertyChanged ("Name ")
Elegant. In addition, you can check for errors during compilation, especially after the Property name is changed.
Well, I won't say much about the praise for Expression. The following are my experiences:
Expression experience: Merge LambdaExpression
Expression experience 2: LambdaExpression Transformation
Expression experience 3: LambdaExpression as the cache key