|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ask if a class inherits from anotherI need to do something like this
public class a : b{ .... } .... a objecta = new a(); if (objecta "inheritsfrom" b) do something; There's a reserved word to do that? TIA Rodolfo wrote:
Show quoteHide quote > I need to do something like this if(objecta is b)// I think> > public class a : b{ > ... > > } > ... > a objecta = new a(); > > if (objecta "inheritsfrom" b) > do something; > > There's a reserved word to do that? > > TIA > > > > or b B = objecta as b; if(!B is null) //objecta inherits from b HTH JB
Other interesting topics
FindWindow, RegisterWindowMessage, SendMessage
@ sign? A plea for the reinstatement of IDL C# and ADO.Net - Cheap Question! Simple IDE Question ! - How will I clear the "Marks" ? COM interop help Click - open in IEbrowser Data not going into Excel from Form button - Do I need a thread DatetTimePicker playing wave files on specific Audio device ? |
|||||||||||||||||||||||