Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 12:37
Nemanja Trifunovic13-Feb-04 12:37 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 12:41
protectorHeath Stewart13-Feb-04 12:41 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 12:50
Nemanja Trifunovic13-Feb-04 12:50 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 13:00
protectorHeath Stewart13-Feb-04 13:00 
GeneralRe: No private virtual methods? Pin
Nemanja Trifunovic13-Feb-04 14:38
Nemanja Trifunovic13-Feb-04 14:38 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 16:57
protectorHeath Stewart13-Feb-04 16:57 
GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 17:32
protectorHeath Stewart13-Feb-04 17:32 
GeneralRe: No private virtual methods? Pin
leppie13-Feb-04 19:35
leppie13-Feb-04 19:35 
Heath Stewart wrote:
A private method cannot be accessed (except through reflection) by neither the base class or any derivative classes. This means you can't override it because it can't even be seen by either of those classes.

You missed one VERY VERY important other method...

The fact that an enclosed class has access to all its contained class's members, thus infact allowing a private member to be theoritcally marked virtual and to be overriden if the enclosed class derives from it's contained class. Make sense?
class Test
{
  virtual void TestMethod(){}
  class Test2 : Test
  {
    override void TestMethod(){}
  }
}

In my opinion this should be allowed!

leppie::AllocCPArticle("Zee blog");
Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.

GeneralRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 20:00
protectorHeath Stewart13-Feb-04 20:00 
GeneralRe: No private virtual methods? Pin
leppie13-Feb-04 23:31
leppie13-Feb-04 23:31 
GeneralSending Files Pin
David_cole13-Feb-04 9:32
David_cole13-Feb-04 9:32 
GeneralRe: Sending Files Pin
Not Active13-Feb-04 9:58
mentorNot Active13-Feb-04 9:58 
GeneralRe: Sending Files Pin
David_cole13-Feb-04 22:53
David_cole13-Feb-04 22:53 
GeneralIP Retrieval Pin
David_cole13-Feb-04 9:29
David_cole13-Feb-04 9:29 
GeneralRe: IP Retrieval Pin
Kentamanos13-Feb-04 10:43
Kentamanos13-Feb-04 10:43 
GeneralRe: IP Retrieval Pin
HAHAHA_NEXT16-Feb-04 7:57
HAHAHA_NEXT16-Feb-04 7:57 
GeneralHandling Task Switching Pin
raysot77713-Feb-04 9:16
raysot77713-Feb-04 9:16 
GeneralRe: Handling Task Switching Pin
Heath Stewart13-Feb-04 12:38
protectorHeath Stewart13-Feb-04 12:38 
Generalxml in windows forms Pin
rasarit1713-Feb-04 8:43
rasarit1713-Feb-04 8:43 
GeneralRe: xml in windows forms Pin
Heath Stewart13-Feb-04 12:36
protectorHeath Stewart13-Feb-04 12:36 
GeneralItembackground Color in ListBox Pin
Snowjim13-Feb-04 8:01
Snowjim13-Feb-04 8:01 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 12:32
protectorHeath Stewart13-Feb-04 12:32 
GeneralRe: Itembackground Color in ListBox Pin
Snowjim13-Feb-04 14:27
Snowjim13-Feb-04 14:27 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 16:48
protectorHeath Stewart13-Feb-04 16:48 
GeneralInterfaces Pin
MrJJKoolJ13-Feb-04 7:21
MrJJKoolJ13-Feb-04 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.