Y
yhlove
Hi
I declared an array as follows:
dim a as integer()
somewhere else in my program I have the following command:
redim preserve a(size)
I want to check the array length like that
if a.length > 1 then
.......
end if
the problem is that if I check the array length before the redim
command I get an exception:
"Object reference not set to an instance of an object."
abd thats because the array doesn't have length yet (not even 0)
so what should I do? how can check if array is equal to nothing such
in this case?
I tried: if a = nothing then ..... but it has a
compilation error
Yhlove
I declared an array as follows:
dim a as integer()
somewhere else in my program I have the following command:
redim preserve a(size)
I want to check the array length like that
if a.length > 1 then
.......
end if
the problem is that if I check the array length before the redim
command I get an exception:
"Object reference not set to an instance of an object."
abd thats because the array doesn't have length yet (not even 0)
so what should I do? how can check if array is equal to nothing such
in this case?
I tried: if a = nothing then ..... but it has a
compilation error
Yhlove