Private Virtual Method

G

Guest

Hi Ron,

MSDN says
The virtual keyword is used to modify a method, property, indexer or event
declaration, and allow it to be overridden in a derived clas.
You cannot use the virtual modifier with the static, abstract, private or
override modifiers.
The new class—the derived class— gains all the non-private data and behavior
of the base class in addition to any other data or behaviors it defines for
itself.

So why we would need a private virual method as it wouldn't be overridden in
the derived class because it would not have acces to it.

So exactly in which scenario do you wnat a private virtual method?

Regards,
Nishant Rana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top