Question: How would you write code for an integer property called Age with a getter and setter?
- public int Age { get - set }
- public int Age: get set;
- public int Age (get, set );
- public int Age { get; set; }
Answer: The correct answer of the above question is Option D:public int Age { get; set; }