using System;
namespace Tester
{
public class MyClass
{
private int _age;
public int Age
{
set
{
this._age = value;
}
}
} // MyClass ends here.
class Program
{
static void Main()
{
MyClass MC = new MyClass();
int i = MC.Age = 19;
Console.WriteLine(i);
Console.ReadLine();
}
}
}
I have only set accessor but i can still read the value of age. how i can implement write only property which cannot be read.