class A { protected int _p; public virtual int P { get { return 1; } set { throw new NotSupportedException(); } } }