x.GetType()==y. GetType();
or
TypeOf(x)==Type Of(y);
HTH
Alex
"rua17" <rua17@hotmail. com> wrote in message
news:O8mMnmiqDH A.2188@TK2MSFTN GP09.phx.gbl...[color=blue]
> Can anyone tell me what's the command in c#
> that is equivalent to the instanceOf in java?
>
> thanks
>
>[/color]
AlexS <salexru2000NO@ SPAMsympaticoPL EASE.ca> wrote:[color=blue]
> Check GetType and TypeOf
>
> x instanceOf y
>
> will be
>
> x.GetType()==y. GetType();
> or
> TypeOf(x)==Type Of(y);[/color]
No it's not. For instance:
FileStream fs = new FileStream (...);
(fs instanceof Stream) should be true, but that won't work with the
above.
The equivalent C# operator to Java's "instanceof " operator is "is".
"AlexS" <salexru2000NO@ SPAMsympaticoPL EASE.ca> wrote in message
news:uT2#70iqDH A.1408@TK2MSFTN GP11.phx.gbl...[color=blue]
> Check GetType and TypeOf
>
> x instanceOf y
>
> will be
>
> x.GetType()==y. GetType();
> or
> TypeOf(x)==Type Of(y);
>
> HTH
> Alex
>
> "rua17" <rua17@hotmail. com> wrote in message
> news:O8mMnmiqDH A.2188@TK2MSFTN GP09.phx.gbl...[color=green]
> > Can anyone tell me what's the command in c#
> > that is equivalent to the instanceOf in java?
> >
> > thanks
> >
> >[/color]
>
>[/color]
Comment