What are properties in C#?
Mohan Gupta
Properties are smart field in C#. Its a extension of fields or variable. By properties we can access our private variable as public manner. It will not allocate a memory but it will share a memory form fields or variable. Property has 3 types of Process. 1. Read(get) 2. Write(set) 3. Read and Write(get and set) We can call Read and Write property as a Auto implemented Property. Property has 2 types of Accessers. 1. get{}- It will return a value to the variable. 2. set{}- It will assign a value to the variable.
if we want to use private variables one class in another class then we have to go for porperties