Connecting Tech Pros Worldwide Forums | Help | Site Map

Telling what type an object is and checking type

Brian Henry
Guest
 
Posts: n/a
#1: Nov 20 '05
I know i read this somewhere before...

If I have an object of unknown type how can I say is this a datarow? or is
this an integer? then do something based on that... i thought IS worked for
that but it doesnt seem to want to do it correctly...



CJ Taylor
Guest
 
Posts: n/a
#2: Nov 20 '05

re: Telling what type an object is and checking type


typeof

"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:eXJk$sVIEHA.3440@TK2MSFTNGP09.phx.gbl...[color=blue]
> I know i read this somewhere before...
>
> If I have an object of unknown type how can I say is this a datarow? or is
> this an integer? then do something based on that... i thought IS worked[/color]
for[color=blue]
> that but it doesnt seem to want to do it correctly...
>
>[/color]


Brian Henry
Guest
 
Posts: n/a
#3: Nov 20 '05

re: Telling what type an object is and checking type


ah thank you... for some reason my beginning vb.net book says use is...


"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:ulh1DwVIEHA.3200@TK2MSFTNGP10.phx.gbl...[color=blue]
> typeof
>
> "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> news:eXJk$sVIEHA.3440@TK2MSFTNGP09.phx.gbl...[color=green]
> > I know i read this somewhere before...
> >
> > If I have an object of unknown type how can I say is this a datarow? or[/color][/color]
is[color=blue][color=green]
> > this an integer? then do something based on that... i thought IS worked[/color]
> for[color=green]
> > that but it doesnt seem to want to do it correctly...
> >
> >[/color]
>
>[/color]


CJ Taylor
Guest
 
Posts: n/a
#4: Nov 20 '05

re: Telling what type an object is and checking type


I'm not sure the exact difference, just the time to use it. =)

-CJ


"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:eJtKOzVIEHA.4052@TK2MSFTNGP12.phx.gbl...[color=blue]
> ah thank you... for some reason my beginning vb.net book says use is...
>
>
> "CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
> news:ulh1DwVIEHA.3200@TK2MSFTNGP10.phx.gbl...[color=green]
> > typeof
> >
> > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
> > news:eXJk$sVIEHA.3440@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > I know i read this somewhere before...
> > >
> > > If I have an object of unknown type how can I say is this a datarow?[/color][/color][/color]
or[color=blue]
> is[color=green][color=darkred]
> > > this an integer? then do something based on that... i thought IS[/color][/color][/color]
worked[color=blue][color=green]
> > for[color=darkred]
> > > that but it doesnt seem to want to do it correctly...
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


Closed Thread