Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking Array values

Status
Not open for further replies.

RycherX

Programmer
Mar 18, 2002
20
0
0
US
When I use length, it gives me the capacity of the BlockList. Is there any way to check if an array contains values that are not equal to "nothing".

Dim BlockList as String

reDim BlockList(50)

if BlockList.length > 0 then

end if
 
Code:
Dim BlockList as String

reDim BlockList(50)

dim IsFull as boolean = True
dim iList as integer

if not BlockList is nothing then
  for iList = 0 to BlockList.Length - 1
    if BlockList(iList) is nothing then
      IsFull=False
      Exit For
    End If
  next
Else
  IsFull = False
end if

return IsFull

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top