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

C#

 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 12:44
leppie8-Mar-03 12:44 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 12:56
moredip8-Mar-03 12:56 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 13:14
leppie8-Mar-03 13:14 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 13:43
moredip8-Mar-03 13:43 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 13:53
moredip8-Mar-03 13:53 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 14:10
moredip8-Mar-03 14:10 
GeneralRe: Inherited Static Constructors Pin
leppie8-Mar-03 14:25
leppie8-Mar-03 14:25 
GeneralRe: Inherited Static Constructors Pin
moredip8-Mar-03 16:05
moredip8-Mar-03 16:05 
I don't think I am using instance-specific data, only class-specific. It's kinda like parametric polymorphism in C++, except with static variables rather than template variables.

All you need for a Delete is a tableName and a PKName, right? And that isn't instance specific, it's class-specific. So I don't see why C# won't let me create a base class static function Delete() which uses a different value for a static variable depending on what the instantiating class is.

When you say "you want to use a single value to store 3 different values. That is just impossible" I disagree. If you think about it, it's no different than using one method signature to refer to 3 different methods depending on the invoking object's class. The difference is that it's a string rather than a function pointer, and that the polymorphism can be resolved at compile-time, not run-time (I think...).

Hmm, I think this could all be academic anyway, if C# can't do it then it can't do it. It just seems ugly to me to create a non-static variable that doesn't use any instance-specific data.
GeneralRe: Inherited Static Constructors Pin
leppie9-Mar-03 7:02
leppie9-Mar-03 7:02 
GeneralRe: Inherited Static Constructors Pin
moredip9-Mar-03 7:26
moredip9-Mar-03 7:26 
GeneralRe: Inherited Static Constructors Pin
leppie9-Mar-03 7:54
leppie9-Mar-03 7:54 
GeneralTextBox DataBinding Pin
leppie8-Mar-03 7:24
leppie8-Mar-03 7:24 
GeneralRe: TextBox DataBinding Pin
leppie8-Mar-03 7:31
leppie8-Mar-03 7:31 
GeneralDocking Problem Pin
Mazdak8-Mar-03 7:02
Mazdak8-Mar-03 7:02 
GeneralRe: Docking Problem Pin
leppie8-Mar-03 7:19
leppie8-Mar-03 7:19 
GeneralRe: Docking Problem Pin
Mazdak8-Mar-03 8:15
Mazdak8-Mar-03 8:15 
GeneralRe: Docking Problem Pin
leppie8-Mar-03 8:25
leppie8-Mar-03 8:25 
GeneralRe: Docking Problem Pin
Roger Alsing8-Mar-03 11:33
Roger Alsing8-Mar-03 11:33 
GeneralRe: Docking Problem Pin
leppie8-Mar-03 12:08
leppie8-Mar-03 12:08 
GeneralRe: Docking Problem Pin
Mazdak8-Mar-03 17:53
Mazdak8-Mar-03 17:53 
QuestionAnything Like MFC's CWinThread in C#? Pin
Xytme8-Mar-03 6:33
Xytme8-Mar-03 6:33 
AnswerRe: Anything Like MFC's CWinThread in C#? Pin
Mazdak8-Mar-03 7:04
Mazdak8-Mar-03 7:04 
QuestionAnything Like MFC's CWinThread in C#? Pin
Xytme8-Mar-03 6:33
Xytme8-Mar-03 6:33 
AnswerRe: Anything Like MFC's CWinThread in C#? Pin
David Stone8-Mar-03 6:44
sitebuilderDavid Stone8-Mar-03 6:44 
QuestionIs there anything like MFC's CWinThread in C#? Pin
Xytme8-Mar-03 6:31
Xytme8-Mar-03 6:31 

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.