An Employee class has a property called age and emp is reference to a Employee object and we want the statement Console.WriteLine(emp.age) to fail. Which of the following options will ensure this functionality?
Correct Answer: Declare age property with only set accessor.
Discussion & Comments