Re: inheritance not working properly -- Help please!!



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

.



Relevant Pages

  • Re: Find object inside arraylists by object attribute
    ... > public override bool Equals ... > //whenever you override equals you should override GetHashCode too ... > public override int GetHashCode() ... > instead that you just use that in your arraylit instead: ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Find object inside arraylists by object attribute
    ... you will need to override the Equals method inside your class such that it ... public override int GetHashCode() ... instead that you just use that in your arraylit instead: ...
    (microsoft.public.dotnet.languages.csharp)
  • What is the equivalent of Delphis "reintroduce"?
    ... I would like to override a method from an inherited class, ... private void Init() { ... reintroduce modifier, but I couldn't find a way in C#. ...
    (microsoft.public.dotnet.languages.csharp)
  • "new" vs "override" for a method
    ... What is the difference between an inherited class overriding a base ... public override bool Equiv(object obj) ... Why might I want to new vs override in the method? ... public bool override Equals ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: overriding the Size property in Control?
    ... > Why not just override OnSizeChanged? ... > Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> public override Size Size ...
    (microsoft.public.dotnet.languages.csharp)

Loading