Re: inheritance not working properly -- Help please!!
- From: "ThunderMusic" <NoSpAmdanlatathotmaildotcom@xxxxxxxxxx>
- Date: Fri, 4 Aug 2006 12:05:40 -0400
ok, I'll post the base class and the inherited class (definition and 1
method, because it would be too long)
public class CNetworkClient<PlayerInfos> : IDisposable where PlayerInfos :
CPlayerInfos, new()
{
public void Connect()
{
// Do things
}
}
public class CNetworkServer<PlayerInfos> : CNetworkClient<PlayerInfos> where
PlayerInfos : CPlayerInfos, new()
{
public override // that's where it should pop with the Connect() method,
but it's not
}
Everything seems normal to me, so I don't understand why it doesn't work...
it's important to notice that the project builds (by removing the "public
override" I just added in the CNetworkServer class
What could be the cause?
Thanks
ThunderMusic
<luvdotnet@xxxxxxxxxxx> wrote in message
news:1154706811.737280.145390@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can you post a more complete simple code to better understand your
problem?
ThunderMusic wrote:
hi,
I have two classes in C#, one is the base, the other inherits from the
base
class... both are generics... Here is the definition of the second class
:
public class CNetworkServer<PlayerInfos> : CNetworkClient<PlayerInfos>
where
PlayerInfos : CPlayerInfos, new()
{
}
Here is the problem... when I type "public override", the intellisense
should pop with my base class methods... instead it pops with 3 methods
:
Equals, GetHashCode and ToString...
Is there a problem in my definition? here's on of my base class method
that
should be overrided : public void Connect()... Must I add anything to
the
method so I can override it in my inherited class?
I tried to rebuild the project, but no change, still the same...
Can anyone help please?
Thanks
ThunderMusic
.
- Follow-Ups:
- Re: inheritance not working properly -- Help please!!
- From: Marc Gravell
- Re: inheritance not working properly -- Help please!!
- References:
- inheritance not working properly -- Help please!!
- From: ThunderMusic
- Re: inheritance not working properly -- Help please!!
- From: luvdotnet
- inheritance not working properly -- Help please!!
- Prev by Date: Re: How to create multi param indexer
- Next by Date: Re: string.IsNullOrEmpty() - is it always enough?
- Previous by thread: Re: inheritance not working properly -- Help please!!
- Next by thread: Re: inheritance not working properly -- Help please!!
- Index(es):
Relevant Pages
|
Loading