Results 1 to 3 of 3

Thread: Is Nothing??

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Resolved Is Nothing??

    How do you do an Is Nothing like in VB.NET?
    Last edited by wey97; Nov 10th, 2004 at 09:48 AM.

  2. #2
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188
    if (variable == null)

  3. #3
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    helpfull tip: stucts can't be tested for null and neither can int I think it's int anyway.

    I usually do more then one check to make certian.
    Code:
    if(stringVar != null && stringVar != ""){return true;}
    it isn't supposed to be required, either test should work, but I like to be sure of things. Also, back in vb6 Microsoft said a lot of things worked one way, and they flat out didn't and weird things would happen like the exact same code would work in one place and not in another, but that usually inloved strings.
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width