By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,563 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,563 IT Pros & Developers. It's quick & easy.

What does it mean when an abstract class is virtual

P: n/a
Hello!!

I know what an abstract class is which mean that the one of the derived
class must define
the abstract methods in the abstract class. So all the abstract methods in
the abstarct class must be defined by some derived class.

What does it mean when an abstract class is virtual?

//Tony

Apr 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
tony wrote:
I know what an abstract class is which mean that the one of the derived
class must define
the abstract methods in the abstract class. So all the abstract methods in
the abstarct class must be defined by some derived class.

What does it mean when an abstract class is virtual?


Classes can't be declared as "virtual". I assume you've seen this
somewhere in an example - could you give that example?

Jon

Apr 19 '06 #2

P: n/a
Both abstract and virtual classes have to be inherited from.

Abstract (or pure virtual) classes are classes that contain no
functionality. They really just define an interface that child classes have
to implement.

Virutal classes contain a mix of concrete functionality and abstract methods
that have to be implemented in child classes.

Note that these are O-O design concepts and have no effect on you C# code
where everything is just declared as abstract (or not).

"tony" wrote:
Hello!!

I know what an abstract class is which mean that the one of the derived
class must define
the abstract methods in the abstract class. So all the abstract methods in
the abstarct class must be defined by some derived class.

What does it mean when an abstract class is virtual?

//Tony

Apr 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.