describe the properties in C sharp

Briefly describe the properties in C# and state the advantages which are attained by using them in programs?

E

Expert

Verified

In C#, a property is a method to expose the internal data element of the class in a simple and intuitive manner. Or we can say it is the simple extension of data fields. We can create the property by defining the externally available name and then writing a set and get property accessors. The get property accessor is used to return a property value. The set property accessor is used to allot a new value to a property.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.