Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
GeneralSVG DOM Pin
Victor Boctor4-May-05 16:28
Victor Boctor4-May-05 16:28 
GeneralScreen Scraping Pin
Anonymous4-May-05 16:26
Anonymous4-May-05 16:26 
GeneralRe: Screen Scraping Pin
keith maddox5-May-05 5:42
keith maddox5-May-05 5:42 
Generalplay movi file by c# Pin
abugalib4-May-05 15:22
abugalib4-May-05 15:22 
GeneralRe: play movi file by c# Pin
MoustafaS5-May-05 0:55
MoustafaS5-May-05 0:55 
Generalmultiple same taskbarnotifier in C# Pin
dwark1064-May-05 14:57
dwark1064-May-05 14:57 
GeneralAdding HTML Files to Solution Pin
C.S.4-May-05 14:38
C.S.4-May-05 14:38 
GeneralHelp with class hierarchy Pin
ICustomTypeDescriptor4-May-05 14:07
ICustomTypeDescriptor4-May-05 14:07 
I have to implement two controls - MyPicture (extends PictureBox) and MyLabel (extends Label). They both have the same additional properties and fields, and the properties do the exact same thing in both these classes. Each property calls Invalidate methods. Both classes have a constructor which puts some default values to the fields, and override the OnPaint method.
Now the problem is: how would you implement this hierarchy in C#? I'm quite new to C# and OOP and I am not fully accustomed to it. I know I can inherit from one class and implement many interfaces. But the additional properties cannot be an interface becouse it contains fields and I would have to write exactly the same code in both classes.
So my request is - how would yopu implement this hierarchy?
GeneralRe: Help with class hierarchy Pin
Marc Clifton4-May-05 14:52
mvaMarc Clifton4-May-05 14:52 
GeneralRe: Help with class hierarchy Pin
Claudio Grazioli4-May-05 21:39
Claudio Grazioli4-May-05 21:39 
GeneralRe: Help with class hierarchy Pin
ICustomTypeDescriptor4-May-05 22:39
ICustomTypeDescriptor4-May-05 22:39 
GeneralStop Word Application programmatically Pin
rikpak4-May-05 12:54
rikpak4-May-05 12:54 
GeneralRe: Stop Word Application programmatically Pin
Fernando Soto4-May-05 14:51
Fernando Soto4-May-05 14:51 
Generaldropdown controls Pin
leesamanth4-May-05 11:26
leesamanth4-May-05 11:26 
GeneralRe: dropdown controls Pin
MoustafaS4-May-05 13:01
MoustafaS4-May-05 13:01 
GeneralRe: dropdown controls Pin
leesamanth4-May-05 19:26
leesamanth4-May-05 19:26 
GeneralRe: dropdown controls Pin
MoustafaS5-May-05 1:21
MoustafaS5-May-05 1:21 
GeneralRe: dropdown controls Pin
leesamanth5-May-05 7:43
leesamanth5-May-05 7:43 
GeneralC# IDE question Pin
hongheo764-May-05 11:11
hongheo764-May-05 11:11 
GeneralRe: C# IDE question Pin
MoustafaS4-May-05 13:54
MoustafaS4-May-05 13:54 
GeneralUpload file Pin
vuthaianh4-May-05 7:38
vuthaianh4-May-05 7:38 
GeneralRe: Upload file Pin
Polis Pilavas4-May-05 10:59
Polis Pilavas4-May-05 10:59 
GeneralTableLayoutPanel (Whidbey) Pin
Gregory Bush4-May-05 7:18
Gregory Bush4-May-05 7:18 
GeneralRe: TableLayoutPanel (Whidbey) Pin
Judah Gabriel Himango4-May-05 8:14
sponsorJudah Gabriel Himango4-May-05 8:14 
GeneralAppDomain Pin
pgoel764-May-05 6:04
pgoel764-May-05 6:04 

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.