Declare a dummy array of the same type. Never put any values into this array. When you want to re-initialize your "working array", assign it to the value of the empty array. This will clear out the "working" array and make the UpperBound function return the correct value (zero). See sample code below:
string ls_EmptyArray[]
string ls_NameArray[]
ls_NameArray[1] = "James"
... more work ...
// empty out Name Array
ls_NameArray = ls_EmptyArray
0 comments:
Post a Comment