mental block...

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

    mental block...

    I am having a mental block...

    What is the method for determining if an oject has been instantaited in C#?

    Ex:

    Dataset d;

    How can I tell if d has been instantiated?

    Yea, I know. Kinda trivial but I can't find the answer in any of my
    references.


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: mental block...

    Craig,

    If it is a reference type, then you can check to see if it is null, like
    this:

    if (d == null)

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "craig" <e@mail.com> wrote in message
    news:O9T1MM%23S DHA.304@tk2msft ngp13.phx.gbl.. .[color=blue]
    > I am having a mental block...
    >
    > What is the method for determining if an oject has been instantaited in[/color]
    C#?[color=blue]
    >
    > Ex:
    >
    > Dataset d;
    >
    > How can I tell if d has been instantiated?
    >
    > Yea, I know. Kinda trivial but I can't find the answer in any of my
    > references.
    >
    >[/color]


    Comment

    Working...