Click here to Skip to main content
15,887,816 members
Home / Discussions / C#
   

C#

 
QuestionC++ class defined in header file. Implementation in C# ? Pin
crushinghellhammer2-Aug-04 14:42
crushinghellhammer2-Aug-04 14:42 
AnswerRe: C++ class defined in header file. Implementation in C# ? Pin
Christian Graus2-Aug-04 14:56
protectorChristian Graus2-Aug-04 14:56 
GeneralData Grid problem Pin
Anonymous2-Aug-04 13:33
Anonymous2-Aug-04 13:33 
QuestionMoved code breaks? Pin
Chris Korzeniowski2-Aug-04 13:09
Chris Korzeniowski2-Aug-04 13:09 
AnswerRe: Moved code breaks? Pin
Jay Shankar2-Aug-04 19:00
Jay Shankar2-Aug-04 19:00 
AnswerRe: Moved code breaks? Pin
sreejith ss nair2-Aug-04 19:22
sreejith ss nair2-Aug-04 19:22 
GeneralRe: Moved code breaks? Pin
Jay Shankar2-Aug-04 22:41
Jay Shankar2-Aug-04 22:41 
Questioncan't define a static method in an interface....? Pin
Jan R Hansen2-Aug-04 11:53
Jan R Hansen2-Aug-04 11:53 
Hi,

My main app need to call a static method on several different classes, so each class (A and B) inherited a base class (BASE) that defined and implemented (empty) a static method so that the main app could do this

doSomething()<br />
{<br />
    ((BASE)child).TheStaticMethod(...)<br />
}


Other methods were also defined as abstract, and had to be implemented by A and B.

Now I wanted things a bit "cleaner" so I created an interface that classes A and B inherited from and thus had to implement, which works just fine for all other methods than the static one. You cant say

Interface IBase<br />
{<br />
    static void ThePreviouslyStaticMethod();<br />
}


- as you get a "error CS0106: The modifier 'static' is not valid for this item" from the compiler.

Now what do I do ? Isn't it possible to force classes to implement a certain static method ?

Thanks in advance

/Jan

Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
QuestionDirect X 9 ID3 tags ? Pin
Christian Graus2-Aug-04 11:09
protectorChristian Graus2-Aug-04 11:09 
AnswerRe: Direct X 9 ID3 tags ? Pin
leppie2-Aug-04 19:39
leppie2-Aug-04 19:39 
GeneralRe: Direct X 9 ID3 tags ? Pin
Christian Graus3-Aug-04 10:48
protectorChristian Graus3-Aug-04 10:48 
GeneralRe: Direct X 9 ID3 tags ? Pin
Christian Graus3-Aug-04 13:39
protectorChristian Graus3-Aug-04 13:39 
GeneralRe: Direct X 9 ID3 tags ? Pin
leppie3-Aug-04 19:11
leppie3-Aug-04 19:11 
GeneralRe: Direct X 9 ID3 tags ? Pin
Christian Graus4-Aug-04 10:54
protectorChristian Graus4-Aug-04 10:54 
GeneralRe: Direct X 9 ID3 tags ? Pin
leppie3-Aug-04 19:12
leppie3-Aug-04 19:12 
GeneralAlignment of listview Pin
Christian Graus2-Aug-04 10:56
protectorChristian Graus2-Aug-04 10:56 
GeneralRe: Alignment of listview Pin
beowulfagate2-Aug-04 13:59
beowulfagate2-Aug-04 13:59 
GeneralMulti-Column What Pin
Peter86753092-Aug-04 7:41
Peter86753092-Aug-04 7:41 
GeneralRe: Multi-Column What Pin
Nick Parker2-Aug-04 8:52
protectorNick Parker2-Aug-04 8:52 
GeneralRe: Multi-Column What Pin
Peter86753092-Aug-04 9:42
Peter86753092-Aug-04 9:42 
Question&quot;Bad Form&quot; to use public class variables without get &amp; set? Pin
ThomasH12-Aug-04 7:06
ThomasH12-Aug-04 7:06 
AnswerRe: &quot;Bad Form&quot; to use public class variables without get &amp; set? Pin
Steven Campbell2-Aug-04 7:38
Steven Campbell2-Aug-04 7:38 
GeneralRe: &quot;Bad Form&quot; to use public class variables without get &amp; set? Pin
Judah Gabriel Himango2-Aug-04 8:05
sponsorJudah Gabriel Himango2-Aug-04 8:05 
GeneralRe: &quot;Bad Form&quot; to use public class variables without get &amp; set? Pin
ThomasH12-Aug-04 9:16
ThomasH12-Aug-04 9:16 
GeneralRe: &quot;Bad Form&quot; to use public class variables without get &amp; set? Pin
Nemanja Trifunovic2-Aug-04 8:18
Nemanja Trifunovic2-Aug-04 8:18 

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.