Quantcast
Channel: Daily .NET Tips » What’s New in C#6.0
Viewing all articles
Browse latest Browse all 9

Initialize Auto-Property and Getter Only Auto-Property in C# 6.0

$
0
0
So far we have seen, Property can be initialized only in the constructor, and if it has any backing field defined, that can be initialized where it is declared.   C# 6.0  introduced a new features called “Auto-Property initializer” that allows property to be initialized like fields in the same line where it has been declared. [...]

Viewing all articles
Browse latest Browse all 9

Trending Articles