What is Property?

1/7/2020 6:49:53 AM

Property look like a variable but it has some special features like (get set) accessor. This accessor responsible to value get and set access permission. Some time it’s called auto implemented property of the C#. This property contains the class. Given bellow the example and explain of the code:

internal class Students
        public int ID { get; set; }
        public string Name { get; set; }
        public int AccountId { get; set; }
        public string Email { get; set; }

In the Students class contain the four-property name as ID, Name, AccountId, Email. Every property has get and set access modifier.