orekin
asked on
ListBox Items collection to String Array in VB.NET 1.1
Hi
Here is a helper function I have that I use to return the elements of a list box as a string array. Is there a better way ?
Orekin
Public Shared Function ReturnListBoxItemsAtString Array(ByVa l theListBox As Windows.Forms.ListBox) As String()
Dim strArr As String()
ReDim strArr(theListBox.Items.Co unt - 1)
theListBox.Items.CopyTo(st rArr, 0)
ReturnListBoxItemsAtString Array = strArr
End Function
Here is a helper function I have that I use to return the elements of a list box as a string array. Is there a better way ?
Orekin
Public Shared Function ReturnListBoxItemsAtString
Dim strArr As String()
ReDim strArr(theListBox.Items.Co
theListBox.Items.CopyTo(st
ReturnListBoxItemsAtString
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.