Properties in C#

State the properties in C# and the advantages that are obtained by using them in programs.

E

Expert

Verified

In C#, property is a mode to expose an internal data element of a class in simple and intuitive manner. Also, it is a simple extension of the data fields. A property can be created by describing an externally available name and then writing the set and get the property accessors. The get property accessor is used in order to return the property value. While set property accessor is used to allocate a new value to the property.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.