Is there any way to override autoproperty functionality in a derived class from the base class? For Example:
class Foo
{
public override void OverrideSetSomeHow()
{
//do something
}
public override void OverrideGetSomeHow()
{
//do something
}
}
class Bar : Foo
{
public string Name { get; set; }
}
class SomeOtherClass: Foo
{
public Guid Id { get; set; }
}
the desired effect would be that the get and set call the overridden methods in the base class (or however it would need to happen). i would like to enforce the functionality for get and set in all the derived classes without expecting other people using the code to know what the hell its doing, and it would look a hell of a lot cleaner than putting all of the identical logic in a bunch of different places.