471,330 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

overriding method or property in partial class

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?

Jan 26 '06 #1
1 9110
john_teague <jc******@gmail.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jan 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Lelekács Zoltán | last post: by
16 posts views Thread by pawel.pabich | last post: by
4 posts views Thread by Sami Rehman | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.