Quantcast
Channel: Lambda for getter and setter of property - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Lambda for getter and setter of property

$
0
0

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?

public int Prop {   get => propVar;   set => propVar = value;}

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images