In C# 6.0 I can write:
public int Prop => 777;
But I want to use getter and setter. Is there a way to do something kind of the next?
There is no such syntax, but the older syntax is pretty similar:
private int propVar; public int Prop { get { return propVar; } set { propVar = value; } }
Or
public int Prop { get; set; }