Click here to Skip to main content
15,908,254 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mouse/Key Messages in Windows Service Pin
jeff_martin13-Nov-03 3:51
jeff_martin13-Nov-03 3:51 
GeneralRe: Mouse/Key Messages in Windows Service Pin
krisp13-Nov-03 16:36
krisp13-Nov-03 16:36 
GeneralRe: Mouse/Key Messages in Windows Service Pin
Jonathan Slenders13-Nov-03 9:41
Jonathan Slenders13-Nov-03 9:41 
GeneralGet Derived class Pin
pnolan12-Nov-03 19:21
pnolan12-Nov-03 19:21 
GeneralRe: Get Derived class Pin
krisp12-Nov-03 19:46
krisp12-Nov-03 19:46 
GeneralRe: Get Derived class Pin
pnolan12-Nov-03 20:04
pnolan12-Nov-03 20:04 
GeneralRe: Get Derived class Pin
krisp12-Nov-03 20:29
krisp12-Nov-03 20:29 
GeneralRe: Get Derived class Pin
Colin Angus Mackay12-Nov-03 23:13
Colin Angus Mackay12-Nov-03 23:13 
If all the Class Bs have the same set of properties you could create an interface and inherit from the interface as well as Class A. Then when you are iterating through all the objects via the reference to class A you can cast to the interface.

class B : A, IMyCommonProperties
{
}

foreach(A myObject in myObjectCollection)
{
IMyCommonProperties mcp = (IMyCommonProperties)myObject;
mcp.MyProperty1; // etc.
}


--Colin Mackay--

"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)


GeneralCachedBitmap Pin
mhmoud rawas12-Nov-03 18:54
mhmoud rawas12-Nov-03 18:54 
GeneralRe: CachedBitmap Pin
Corinna John12-Nov-03 20:54
Corinna John12-Nov-03 20:54 
GeneralRe: CachedBitmap Pin
mhmoud rawas12-Nov-03 21:31
mhmoud rawas12-Nov-03 21:31 
GeneralRe: CachedBitmap Pin
J. Dunlap12-Nov-03 21:03
J. Dunlap12-Nov-03 21:03 
GeneralRe: CachedBitmap Pin
mhmoud rawas12-Nov-03 22:55
mhmoud rawas12-Nov-03 22:55 
GeneralRe: CachedBitmap Pin
J. Dunlap13-Nov-03 8:42
J. Dunlap13-Nov-03 8:42 
GeneralRe: CachedBitmap Pin
mhmoud rawas14-Nov-03 20:16
mhmoud rawas14-Nov-03 20:16 
Questionhow to control web components in winform by embeding a browser(ie) Pin
nakey_yang12-Nov-03 18:45
nakey_yang12-Nov-03 18:45 
AnswerRe: how to control web components in winform by embeding a browser(ie) Pin
mhmoud rawas12-Nov-03 18:57
mhmoud rawas12-Nov-03 18:57 
AnswerRe: how to control web components in winform by embeding a browser(ie) Pin
Heath Stewart13-Nov-03 3:36
protectorHeath Stewart13-Nov-03 3:36 
GeneralRe: how to control web components in winform by embeding a browser(ie) Pin
J. Dunlap13-Nov-03 8:38
J. Dunlap13-Nov-03 8:38 
AnswerRe: how to control web components in winform by embeding a browser(ie) Pin
Heath Stewart13-Nov-03 3:47
protectorHeath Stewart13-Nov-03 3:47 
GeneralRe: how to control web components in winform by embeding a browser(ie) Pin
J. Dunlap13-Nov-03 8:26
J. Dunlap13-Nov-03 8:26 
GeneralCOM+ Transaction 70-320 exam question Pin
CillyMe12-Nov-03 17:52
CillyMe12-Nov-03 17:52 
GeneralFileDialog in WEB forms application Pin
Rostrox12-Nov-03 17:22
Rostrox12-Nov-03 17:22 
GeneralRe: FileDialog in WEB forms application Pin
Heath Stewart13-Nov-03 3:20
protectorHeath Stewart13-Nov-03 3:20 
GeneralQuestion about threads Pin
zhang_ding12-Nov-03 15:53
zhang_ding12-Nov-03 15:53 

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.