Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Arrays - How can I tell it is empty

Arrays - How can I tell it is empty

Scheduled Pinned Locked Moved Visual Basic
data-structuresquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    directred
    wrote on last edited by
    #1

    Is there a single command that will tell me if an Array = nothing i.e. no data in array This would be a 2 dimensional array. What I am looking for is something list this If Array <> Nothing then ****do something else ****do something else endif

    E 1 Reply Last reply
    0
    • D directred

      Is there a single command that will tell me if an Array = nothing i.e. no data in array This would be a 2 dimensional array. What I am looking for is something list this If Array <> Nothing then ****do something else ****do something else endif

      E Offline
      E Offline
      Empires
      wrote on last edited by
      #2

      (In .NET) You are right about the <> Nothing part, but if the array has been initialized then this will not work. You could try If (Array.Length > 0 Then), this will tell you if anything is in the array if it has already been initialized.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups