L
latin & geek via DotNetMonster.com
dear all,
hi. i have a little sub routine which works fine in my dummy test program,
but when i insert it in my main program it throws errors.
this is the subroutine:
Public Sub TagListing()
'adds a tag category from the tag stack into the unique tag
collection
Try
TagStrings.Push(JustForArrayInclusion)
TagStrings.CopyTo(OldTags, moveit)
moveit = moveit + 1
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.OKOnly, errortitle)
End Try
End Sub
i get this error at the CopyTo line:
SystemArgumentNullException: Value cannot be null
Parameter name: array
at Systems.Collections.Stack.CopyTo(Array array,Int32 index)
at Catalogue.Module1.TagListing() [....] at line 137
i've declared my array like this in the same module:
'Array to hold all the unique tag categories.
'Used In: TagListing(), BtF3OldTags_Click, Form4_Load
Public OldTags As String()
moveit is correctly at zero the first time around (it's called from a FOR
loop), so i don't understand what the problem is!
can someone please help?
also, one final doubt, what's the difference between
Dim MyArray( ) as String
&
Dim MyArray as String( ) ?
thanks a lot!
hi. i have a little sub routine which works fine in my dummy test program,
but when i insert it in my main program it throws errors.
this is the subroutine:
Public Sub TagListing()
'adds a tag category from the tag stack into the unique tag
collection
Try
TagStrings.Push(JustForArrayInclusion)
TagStrings.CopyTo(OldTags, moveit)
moveit = moveit + 1
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.OKOnly, errortitle)
End Try
End Sub
i get this error at the CopyTo line:
SystemArgumentNullException: Value cannot be null
Parameter name: array
at Systems.Collections.Stack.CopyTo(Array array,Int32 index)
at Catalogue.Module1.TagListing() [....] at line 137
i've declared my array like this in the same module:
'Array to hold all the unique tag categories.
'Used In: TagListing(), BtF3OldTags_Click, Form4_Load
Public OldTags As String()
moveit is correctly at zero the first time around (it's called from a FOR
loop), so i don't understand what the problem is!
can someone please help?
also, one final doubt, what's the difference between
Dim MyArray( ) as String
&
Dim MyArray as String( ) ?
thanks a lot!