Results 1 to 5 of 5

Thread: Testing to see if a collection is initialized

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    4

    Testing to see if a collection is initialized

    OK. So I haven't played with VB in a few years. And it shows. Bah.

    I've got a function that is passed a collection as an optional argument. I need to test whether or not that collection was initialized. Unfortunately, isEmpty only returns valid data for variants. In my mind, this should be fairly easy to do... but it escapes me at the moment. Any help would be appreciated.

    BTW, I'm using the Office 97 version of VB, if it matters. It was what was available.

    Thanks,

    DAlexander

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    If collectionname Is Nothing Then
    ' blah
    End If


    I think.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    4
    Props go to Candor. The IS keyword. Who would have guessed?


  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Originally posted by DAlexander
    Who would have guessed?
    Well....me of course!
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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