הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
This refactoring applies to:
- C#
What: Lets you refactor a lambda expression to use an expression body or a block body.
When: You prefer lambda expressions to use either an expression body or a block body.
Why: Lambda expressions can be refactored to improve readability according to your user preference.
Lambda expression body or block body refactoring
- Place your cursor on the right of a lambda operator.
- Press Ctrl+. to trigger the Quick Actions and Refactorings menu.

- Select Use block body for lambda expressions or Use expression body for lambda expressions.