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. [...]
↧