overriding method or property in partial class

  • Thread starter Thread starter john_teague
  • Start date Start date
J

john_teague

I'm working with a code generator that uses partial classes to
generated the basic stuff and leave the other file alone for you to
make changes.

In the 1.1 version we would inherit from a class and then override a
property or method for customization. How would I do this with a
partial class. override doesn't compile. is there another modifier I
can use?
 
john_teague said:
I'm working with a code generator that uses partial classes to
generated the basic stuff and leave the other file alone for you to
make changes.

In the 1.1 version we would inherit from a class and then override a
property or method for customization. How would I do this with a
partial class. override doesn't compile. is there another modifier I
can use?

No - you can't do this with partial classes. It's something I believe
the C# team are considering for a future release.

Of course, you can still derive from the class and override the method
there.
 
Back
Top