one of my properties looks like this:
public string Name
{
get{ return _name; }
set { _name = value; }
}
but ReSharper is advising me to change it to:
public string Name
{
get => _name;
set => _name = value;
}
if I refactor like that then compilation throws error Is it not possible to have expression body in a Property ?
Before c# 6 you couldn't use expression bodies in properties and had to write something like this.
In c# 6 you can create readonly experession bodies.
In c# 7 you got expression bodies for members like you showed.