Re: Can my class tell if one of its virtual members is overloaded?
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Fri, 26 Aug 2005 21:53:07 +0100
Tony Maresca <tony@xxxxxxxxxxxxx> wrote:
> When you say "the base class doesn't know anything
> about the derived classes",
>
> Um, not sure about that. If my base class can get the
> type of an instance of a derived class, how can we say
> that a base class cannot discover anything about derived
> classes, at runtime?
>
> Are you absolutely sure about that?
The point is that you can never know what all the derived classes of a
type are, unless it's internal. So although all the created instances
of derived types may not override a member, that doesn't mean there
isn't another type around which *does* override a member.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- References:
- Re: Can my class tell if one of its virtual members is overloaded?
- From: Oliver Sturm
- Re: Can my class tell if one of its virtual members is overloaded?
- Prev by Date: c# procedure
- Next by Date: Re: messagebox icons
- Previous by thread: Re: Can my class tell if one of its virtual members is overloaded?
- Next by thread: Re: Can my class tell if one of its virtual members is overloaded?
- Index(es):
Relevant Pages
|