Click here to Skip to main content
15,892,965 members
Home / Discussions / C#
   

C#

 
Questionhow to make faster Invalidate operation? Pin
Susuko5-Jul-06 13:26
Susuko5-Jul-06 13:26 
QuestionDynamic Crystal Reports Pin
smarttom995-Jul-06 12:57
smarttom995-Jul-06 12:57 
QuestionHow to truncate a value and display it to a grid [modified] Pin
Burn E5-Jul-06 12:25
Burn E5-Jul-06 12:25 
QuestionVirtual shared folder Pin
Bossek5-Jul-06 12:15
Bossek5-Jul-06 12:15 
QuestionHow to create a game trainer in C# ? Pin
bunnyEATINGrabbit5-Jul-06 12:01
bunnyEATINGrabbit5-Jul-06 12:01 
AnswerRe: How to create a game trainer in C# ? Pin
Dustin Metzgar5-Jul-06 12:16
Dustin Metzgar5-Jul-06 12:16 
GeneralRe: How to create a game trainer in C# ? Pin
bunnyEATINGrabbit6-Jul-06 4:09
bunnyEATINGrabbit6-Jul-06 4:09 
QuestionInheritance Question Pin
MartinSmith5-Jul-06 11:41
MartinSmith5-Jul-06 11:41 
I have a class of UserControls all of which need to implement the same method.

I can achieve this with an abstract method


public abstract void foo();


However this has a disadvantage:

(A) There is some commonality in the code that it would make sense to extract and put into the base class.

I know that I can achieve this by


//Base
public virtual void foo
(
BaseCode();
)

//Derived
public override void foo
(
SomeCode();
base.foo();
)


But then that gives me 2 disadvantages

(B) It doesn't force a derived class to do it's own implementation of foo
(C) if the derived class doesn't explicitly call base.foo(); my common code doesn't get called.

Is there some other modifier or pattern I can use to achieve A, B, and C?

Or. Is there a good reason why I should not be trying to achieve this?
AnswerRe: Inheritance Question Pin
Dustin Metzgar5-Jul-06 12:20
Dustin Metzgar5-Jul-06 12:20 
AnswerRe: Inheritance Question Pin
Guffa5-Jul-06 12:23
Guffa5-Jul-06 12:23 
Questionconverting a Image to a byte[] Pin
(Steven Hicks)n+15-Jul-06 11:01
(Steven Hicks)n+15-Jul-06 11:01 
AnswerRe: converting a Image to a byte[] Pin
Bluebamboo5-Jul-06 11:29
Bluebamboo5-Jul-06 11:29 
GeneralRe: converting a Image to a byte[] Pin
(Steven Hicks)n+15-Jul-06 13:36
(Steven Hicks)n+15-Jul-06 13:36 
AnswerRe: converting a Image to a byte[] Pin
Jon Sagara5-Jul-06 11:36
Jon Sagara5-Jul-06 11:36 
AnswerRe: converting a Image to a byte[] Pin
Ravi Bhavnani5-Jul-06 13:26
professionalRavi Bhavnani5-Jul-06 13:26 
AnswerRe: converting a Image to a byte[] [Solved] [modified] Pin
(Steven Hicks)n+16-Jul-06 5:18
(Steven Hicks)n+16-Jul-06 5:18 
Questionshow release version Pin
donkaiser5-Jul-06 10:39
donkaiser5-Jul-06 10:39 
AnswerRe: show release version Pin
mav.northwind6-Jul-06 5:51
mav.northwind6-Jul-06 5:51 
Questionaccessing http headers in .NET 2.0 WebBrowser Control Pin
mbenezra5-Jul-06 10:03
mbenezra5-Jul-06 10:03 
AnswerRe: accessing http headers in .NET 2.0 WebBrowser Control Pin
led mike5-Jul-06 10:27
led mike5-Jul-06 10:27 
GeneralRe: accessing http headers in .NET 2.0 WebBrowser Control Pin
mbenezra5-Jul-06 12:33
mbenezra5-Jul-06 12:33 
GeneralRe: accessing http headers in .NET 2.0 WebBrowser Control Pin
led mike6-Jul-06 4:49
led mike6-Jul-06 4:49 
QuestionSize problem Pin
Phoen255-Jul-06 9:40
Phoen255-Jul-06 9:40 
AnswerRe: Size problem Pin
Phoen255-Jul-06 9:46
Phoen255-Jul-06 9:46 
AnswerRe: Size problem Pin
Alexander Wiseman5-Jul-06 10:55
Alexander Wiseman5-Jul-06 10:55 

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.