I wish the Get & Set methods for a property are separate in C#. It would
be nice if I could do the following:
class Base
{
public bool IsFoo
{
set { m_isFoo = value; }
}
public bool IsBar
{
abstract get;
virtual set { m_isBar = value; }
}
}
class DerivedA : Base
{
public bool IsFoo // Inherit Set and provide Get
{
get { /* ..... */ }
}
public bool IsBar // inherit the optional Set, must override Get
{
override get { /* .... */ }
}
}
be nice if I could do the following:
class Base
{
public bool IsFoo
{
set { m_isFoo = value; }
}
public bool IsBar
{
abstract get;
virtual set { m_isBar = value; }
}
}
class DerivedA : Base
{
public bool IsFoo // Inherit Set and provide Get
{
get { /* ..... */ }
}
public bool IsBar // inherit the optional Set, must override Get
{
override get { /* .... */ }
}
}