Suggestion: new analyzer for replacing new Func<>(lambda) to lambda
Open
Area-Analyzers
Feature Request
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 294
- Avg merge
- 2h 30m
- Merged PRs (30d)
- 4
Description
Can you provide an analyzer that would replace:
`var squareFunc = new Func(x => x*x);`
or
`Func squareFunc = new Func(x => x*x);`
into
`Func squareFunc = x => x * x;`
That is to remove the `new` call and instead have the lambda be typed through the type of the assigned variable.
(and of course the same for any `Func<>`, `Action<>` or other delegate types)
Contributor guide
Assessment
This issue has not been assessed yet.