Re: Casting up to inheriting class from base?
- From: "Mark Wilden" <MarkWilden@xxxxxxxxxxxxxxxxx>
- Date: Thu, 6 Jul 2006 11:30:43 -0700
"Brett Romero" <account@xxxxxxxxx> wrote in message
news:1152202983.560030.210290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Say I have a class inheriting some base class:
BaseClass
{
void Foo()
{
Update();
}
}
Class1 : BaseClass
{
void Update(){}
}
How can I have the base class know which instance class has inherited
it and use a method in the instance class? Only certain types of
classes will use the base and those classes will always have an
Update() method.
It's hard for me to say for sure (since "instance class" isn't really
correct - do you mean "derived class"?), but it's possible you just want to
make Foo() virtual.
///ark
.
- Follow-Ups:
- Re: Casting up to inheriting class from base?
- From: Brett Romero
- Re: Casting up to inheriting class from base?
- References:
- Casting up to inheriting class from base?
- From: Brett Romero
- Casting up to inheriting class from base?
- Prev by Date: Re: System.AccessViolationException
- Next by Date: Re: Casting up to inheriting class from base?
- Previous by thread: Re: Casting up to inheriting class from base?
- Next by thread: Re: Casting up to inheriting class from base?
- Index(es):
Relevant Pages
|