Description
Lambda expressions and anonymous methods that don’t capture variables should be marked ‘static’ to avoid unnecessary allocations and improve performance.Bad Code
Good Code
Properties
- Category: Usage
- Severity: Info
- Enabled by default: True
- Code fix available: True
