Telling what type an object is and checking type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Henry

    Telling what type an object is and checking type

    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

    #2
    Re: Telling what type an object is and checking type

    typeof

    "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
    news:eXJk$sVIEH A.3440@TK2MSFTN GP09.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]


    Comment

    • Brian Henry

      #3
      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:ulh1DwVIEH A.3200@TK2MSFTN GP10.phx.gbl...[color=blue]
      > typeof
      >
      > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
      > news:eXJk$sVIEH A.3440@TK2MSFTN GP09.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]


      Comment

      • CJ Taylor

        #4
        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:eJtKOzVIEH A.4052@TK2MSFTN GP12.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:ulh1DwVIEH A.3200@TK2MSFTN GP10.phx.gbl...[color=green]
        > > typeof
        > >
        > > "Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
        > > news:eXJk$sVIEH A.3440@TK2MSFTN GP09.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]


        Comment

        Working...