Click here to Skip to main content
15,897,187 members
Home / Discussions / C#
   

C#

 
GeneralRe: static property with polymorphism Pin
lukeer8-Apr-10 4:34
lukeer8-Apr-10 4:34 
AnswerRe: static property with polymorphism Pin
Jimmanuel8-Apr-10 4:38
Jimmanuel8-Apr-10 4:38 
AnswerRe: static property with polymorphism Pin
Luc Pattyn8-Apr-10 4:46
sitebuilderLuc Pattyn8-Apr-10 4:46 
AnswerRe: static property with polymorphism Pin
PIEBALDconsult8-Apr-10 5:06
mvePIEBALDconsult8-Apr-10 5:06 
GeneralRe: static property with polymorphism Pin
harold aptroot8-Apr-10 6:10
harold aptroot8-Apr-10 6:10 
GeneralRe: static property with polymorphism Pin
Luc Pattyn8-Apr-10 6:59
sitebuilderLuc Pattyn8-Apr-10 6:59 
GeneralRe: static property with polymorphism Pin
PIEBALDconsult8-Apr-10 8:13
mvePIEBALDconsult8-Apr-10 8:13 
AnswerSolved: static property with polymorphism Pin
lukeer9-Apr-10 2:59
lukeer9-Apr-10 2:59 
Thanks a lot to everyone.
I finally added a static icon variable to each of the child classes.
The base class got an abstract Image GetDeviceIcon() method that each child class overrides returning its own child class icon. That way the icon is shared between all instances of a child class and can differ between sibling classes.

The drawback is, I have to create an instance of each class once to display the possible icons. But as I said, it's only once.

Thanks again,


luker
Ciao,


luker

QuestionCOM port send/receive Pin
mprice2148-Apr-10 4:02
mprice2148-Apr-10 4:02 
AnswerRe: COM port send/receive Pin
PIEBALDconsult8-Apr-10 4:16
mvePIEBALDconsult8-Apr-10 4:16 
GeneralRe: COM port send/receive Pin
mprice2148-Apr-10 4:23
mprice2148-Apr-10 4:23 
GeneralRe: COM port send/receive Pin
PIEBALDconsult8-Apr-10 5:25
mvePIEBALDconsult8-Apr-10 5:25 
GeneralRe: COM port send/receive Pin
mprice2148-Apr-10 8:42
mprice2148-Apr-10 8:42 
GeneralRe: COM port send/receive Pin
PIEBALDconsult8-Apr-10 11:25
mvePIEBALDconsult8-Apr-10 11:25 
GeneralRe: COM port send/receive Pin
mprice2148-Apr-10 14:20
mprice2148-Apr-10 14:20 
GeneralRe: COM port send/receive Pin
PIEBALDconsult8-Apr-10 17:13
mvePIEBALDconsult8-Apr-10 17:13 
GeneralRe: COM port send/receive Pin
mprice2149-Apr-10 2:25
mprice2149-Apr-10 2:25 
GeneralRe: COM port send/receive Pin
PIEBALDconsult9-Apr-10 3:22
mvePIEBALDconsult9-Apr-10 3:22 
GeneralRe: COM port send/receive Pin
mprice2149-Apr-10 3:46
mprice2149-Apr-10 3:46 
GeneralRe: COM port send/receive Pin
PIEBALDconsult9-Apr-10 4:09
mvePIEBALDconsult9-Apr-10 4:09 
AnswerRe: COM port send/receive Pin
Rajesh Anuhya9-Apr-10 2:36
professionalRajesh Anuhya9-Apr-10 2:36 
GeneralRe: COM port send/receive Pin
mprice21412-Apr-10 4:42
mprice21412-Apr-10 4:42 
GeneralRe: COM port send/receive Pin
mprice21412-Apr-10 7:51
mprice21412-Apr-10 7:51 
QuestionC# : Dispaly data in paragraph format Pin
Member 34895988-Apr-10 2:55
Member 34895988-Apr-10 2:55 
AnswerRe: C# : Dispaly data in paragraph format Pin
Abhinav S8-Apr-10 3:29
Abhinav S8-Apr-10 3:29 

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.