Click here to Skip to main content
15,902,928 members
Home / Discussions / C#
   

C#

 
AnswerRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 19:34
protectorChristian Graus27-Jun-07 19:34 
AnswerRe: Preventing method access in derived class. Pin
stancrm27-Jun-07 19:34
stancrm27-Jun-07 19:34 
AnswerRe: Preventing method access in derived class. Pin
Sathesh Sakthivel27-Jun-07 20:05
Sathesh Sakthivel27-Jun-07 20:05 
AnswerRe: Preventing method access in derived class. Pin
Diana Fernandez27-Jun-07 20:09
Diana Fernandez27-Jun-07 20:09 
GeneralRe: Preventing method access in derived class. Pin
Martin#27-Jun-07 20:19
Martin#27-Jun-07 20:19 
GeneralRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 20:34
protectorChristian Graus27-Jun-07 20:34 
GeneralRe: Preventing method access in derived class. Pin
Martin#27-Jun-07 20:38
Martin#27-Jun-07 20:38 
GeneralRe: Preventing method access in derived class. Pin
Christian Graus27-Jun-07 20:36
protectorChristian Graus27-Jun-07 20:36 
Diana Fernandez wrote:
Because base class implementation should not be used on the object of derived class.


It's a feature of OO ( and the whole point of inheritance ) that derived classes DO inherit the base methods. The best you could do is make SetName virtual on the base class, and override it on the derived, so it calls the new method with a default condition, or have it throw an error.

public override SetName(string Name)
{
SetName(name, true);
}



Christian Graus - Microsoft MVP - C++

"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: Preventing method access in derived class. Pin
Urs Enzler27-Jun-07 22:39
Urs Enzler27-Jun-07 22:39 
QuestionHow to implement an aspect factory Pin
rameshbhojan27-Jun-07 19:10
rameshbhojan27-Jun-07 19:10 
AnswerRe: How to implement an aspect factory Pin
Christian Graus27-Jun-07 19:36
protectorChristian Graus27-Jun-07 19:36 
AnswerRe: How to implement an aspect factory Pin
Sathesh Sakthivel27-Jun-07 20:06
Sathesh Sakthivel27-Jun-07 20:06 
QuestionTimer+web form Pin
razanabanu27-Jun-07 18:44
razanabanu27-Jun-07 18:44 
AnswerRe: Timer+web form Pin
Christian Graus27-Jun-07 19:37
protectorChristian Graus27-Jun-07 19:37 
AnswerRe: Timer+web form Pin
Sathesh Sakthivel27-Jun-07 20:12
Sathesh Sakthivel27-Jun-07 20:12 
GeneralRe: Timer+web form Pin
razanabanu27-Jun-07 20:36
razanabanu27-Jun-07 20:36 
GeneralRe: Timer+web form Pin
Sathesh Sakthivel27-Jun-07 20:59
Sathesh Sakthivel27-Jun-07 20:59 
AnswerRe: Timer+web form Pin
Tamimi - Code27-Jun-07 20:38
Tamimi - Code27-Jun-07 20:38 
QuestionShowing button for property value selction in property pan Pin
KrunalC27-Jun-07 17:44
KrunalC27-Jun-07 17:44 
AnswerRe: Showing button for property value selction in property pan Pin
KrunalC27-Jun-07 21:03
KrunalC27-Jun-07 21:03 
Questionhelp debug the ping program please Pin
neodeaths27-Jun-07 17:20
neodeaths27-Jun-07 17:20 
AnswerRe: help debug the ping program please Pin
Luc Pattyn27-Jun-07 23:07
sitebuilderLuc Pattyn27-Jun-07 23:07 
QuestionUsing Mousewheel----help needed? Pin
Raza568027-Jun-07 17:19
Raza568027-Jun-07 17:19 
AnswerRe: Using Mousewheel----help needed? Pin
RepliCrux27-Jun-07 17:30
RepliCrux27-Jun-07 17:30 
AnswerRe: Using Mousewheel----help needed? Pin
Luc Pattyn27-Jun-07 22:32
sitebuilderLuc Pattyn27-Jun-07 22:32 

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.