Open
Description
Brief description:
An analyzer for suggesting simplifying get => field;
in non-partial properties to just get;
as there is no semantic difference.
Languages applicable: C#
Code example that the analyzer should report:
public class Person
{
public int Age
{
get => field;
// ^^^^^^^^
// Field access can be simplified.
set => field = int.Clamp(0, 100);
}
}
Additional information:
As far as I'm aware there is no semantic difference between get => field;
and get;
. I might not have the full context though, in which case this suggestion might not be applicable.
Documentation requirements:
When this analyzer is implemented, it must be documented by following the steps at Documentation for IDE CodeStyle analyzers.