Is it possible to have virtual properties within a partial class? In my scenario, we have auto-generated classes that are used by our Micro-ORM and map exactly to our database tables.
We often wish to extend these classes, however, so using partial
keyword is absolutely fine in this case.
I have a situation, though, whereby I want to override the auto generated getter in a partial class.
eg:
public partial class MyClass {
public int MyProperty{ get; set; }
}
.. I'd like to override the get
and implement some custom logic without manipulating the auto-generated code. This is vital.
Thanks.