From: Tony Johansson on 31 May 2010 09:17 Hi! I'm a correct if I say that when you have static members you can't use any kind of inheriatance ? //Tony
From: Alberto Poblacion on 31 May 2010 10:31 "Tony Johansson" <johansson.andersson(a)telia.com> wrote in message news:OaFkZOMALHA.4308(a)TK2MSFTNGP04.phx.gbl... > I'm a correct if I say that when you have static members you can't use any > kind of inheriatance ? No, that's not correct. You can inherit perfectly well from a class that contains static members. It's just that the static members will be shared with any instances of the child class, and they cannot be overridden. But otherwise, the class can be inherited with no problem.
From: David Anton on 31 May 2010 10:37 No - having static members doesn't interfere with inheritance. Public static members of a base class become static members of the derived class, so static members participate in the inheritance scheme. -- David Anton Convert between VB, C#, C++, & Java http://www.tangiblesoftwaresolutions.com "Tony Johansson" wrote: > Hi! > > I'm a correct if I say that when you have static members you can't use any > kind of inheriatance ? > > //Tony > > > . >
From: Arne Vajhøj on 31 May 2010 10:39 On 31-05-2010 09:17, Tony Johansson wrote: > I'm a correct if I say that when you have static members you can't use any > kind of inheriatance ? A class with static members can both be a sub class of another class and have sub classes. But static members can not be virtual/overridden. This makes inheritance somewhat irrelevant for static members. Arne
|
Pages: 1 Prev: End a process Next: IDE - Control /Docking Ordering Issue? |