Click here to Skip to main content
15,914,594 members
Home / Discussions / C#
   

C#

 
AnswerRe: No private virtual methods? Pin
Kentamanos13-Feb-04 10:56
Kentamanos13-Feb-04 10:56 
AnswerRe: No private virtual methods? Pin
Heath Stewart13-Feb-04 12:08
protectorHeath Stewart13-Feb-04 12:08 
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 
Fine. Great. Even interesting! But that's C/C++. C# is a different language and .NET presents a somewhat different concept. So IL supports it virtual privates. Most languages don't. While the C# language supports most of the CLI features, many languages don't support even half of that.

If you want to know specifically why Microsoft choose not to support this construct, ask them.

As far as the C# compiler goes, virtual methods calls use the callvirt IL instruction. But the C# compiler doesn't allow access to private members so callvirt - as far as the C# compiler is concerned - can't call the private method. Maybe there is good reason for it, but - as I said - only the C# engineers can answer "why".

 

Microsoft MVP, Visual C#
My Articles
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 
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 

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.