Click here to Skip to main content
16,010,022 members
Home / Discussions / C#
   

C#

 
GeneralRe: including 2 user defined header files Pin
Christian Graus15-Dec-03 10:10
protectorChristian Graus15-Dec-03 10:10 
GeneralRe: including 2 user defined header files Pin
Nick Parker15-Dec-03 10:29
protectorNick Parker15-Dec-03 10:29 
GeneralRe: including 2 user defined header files Pin
David Stone15-Dec-03 11:16
sitebuilderDavid Stone15-Dec-03 11:16 
GeneralRe: including 2 user defined header files Pin
Nick Parker15-Dec-03 12:04
protectorNick Parker15-Dec-03 12:04 
GeneralRe: including 2 user defined header files Pin
David Stone15-Dec-03 21:18
sitebuilderDavid Stone15-Dec-03 21:18 
GeneralRe: including 2 user defined header files Pin
J. Dunlap15-Dec-03 12:13
J. Dunlap15-Dec-03 12:13 
Generaloverriding. want to make a public virtual function private Pin
elena1234515-Dec-03 7:34
elena1234515-Dec-03 7:34 
GeneralRe: overriding. want to make a public virtual function private Pin
Colin Angus Mackay15-Dec-03 8:12
Colin Angus Mackay15-Dec-03 8:12 
The compiler is right because private means that only the class that has the method/property/field can use it. No other class is permitted access including any class derived from it. And virtual tells the compiler to expect derived classes to override it. Therefore making a method private and virtual would be utterly pointless.

Hiding the method kind of goes against the grain of Object Orientation. I remember years ago my OO lecturer at University going on about that. When you create derived classes you are creating specialisations of the base. You should never be taking anything away from the base, just adding new methods and specialising existing ones.

I would suggest that you re-examine your class design and work out if there is a way to better design the classes so that you are not having to take away the functionality in the base.

Alternatively you could explain a bit about your design and maybe some people here can help you re-work it.

--Colin Mackay--

"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)

Enumerators in .NET: See how to customise foreach loops with C#


GeneralRe: overriding. want to make a public virtual function private Pin
elena1234515-Dec-03 10:24
elena1234515-Dec-03 10:24 
GeneralRe: overriding. want to make a public virtual function private Pin
Colin Angus Mackay15-Dec-03 10:52
Colin Angus Mackay15-Dec-03 10:52 
GeneralRe: overriding. want to make a public virtual function private Pin
Mailing Lists15-Dec-03 8:12
Mailing Lists15-Dec-03 8:12 
GeneralRe: overriding. want to make a public virtual function private Pin
Colin Angus Mackay15-Dec-03 9:05
Colin Angus Mackay15-Dec-03 9:05 
GeneralRe: overriding. want to make a public virtual function private Pin
Member 26118815-Dec-03 22:09
Member 26118815-Dec-03 22:09 
GeneralRe: overriding. want to make a public virtual function private Pin
leppie15-Dec-03 8:50
leppie15-Dec-03 8:50 
GeneralCustom control's properties that can be bound to Pin
IonutIsUniqueName15-Dec-03 7:12
IonutIsUniqueName15-Dec-03 7:12 
GeneralRe: Custom control's properties that can be bound to Pin
Heath Stewart15-Dec-03 8:31
protectorHeath Stewart15-Dec-03 8:31 
GeneralRe: Custom control's properties that can be bound to Pin
leppie15-Dec-03 8:53
leppie15-Dec-03 8:53 
QuestionHow to compile C# documentation text (tags summary, param, returns) Pin
Vasek15-Dec-03 7:05
Vasek15-Dec-03 7:05 
AnswerRe: How to compile C# documentation text (tags summary, param, returns) Pin
Heath Stewart15-Dec-03 8:33
protectorHeath Stewart15-Dec-03 8:33 
GeneralRe: How to compile C# documentation text (tags summary, param, returns) Pin
David Stone15-Dec-03 8:35
sitebuilderDavid Stone15-Dec-03 8:35 
GeneralRe: How to compile C# documentation text (tags summary, param, returns) Pin
Vasek15-Dec-03 8:44
Vasek15-Dec-03 8:44 
GeneralRe: How to compile C# documentation text (tags summary, param, returns) Pin
Heath Stewart15-Dec-03 8:46
protectorHeath Stewart15-Dec-03 8:46 
AnswerRe: How to compile C# documentation text (tags summary, param, returns) Pin
David Stone15-Dec-03 8:34
sitebuilderDavid Stone15-Dec-03 8:34 
GeneralRe: How to compile C# documentation text (tags summary, param, returns) Pin
Member 26118815-Dec-03 22:12
Member 26118815-Dec-03 22:12 
GeneralSaving application options Pin
blakeb_115-Dec-03 5:54
blakeb_115-Dec-03 5:54 

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.