Tapojjwal Mandal

Hi...I want to know how to store element in 2 D array Suppose I have a String

a.txt;;; Like this. The Delemeter used here is : and ; . Now I want to store it in a 2d array where the array structure will be like -




Like that....I need help.

Re: Windows Forms General How to load element in 2-D array?

Muthu Krishnan. R

Code Snippet

Public Function SplitString(ByVal s As String) As String(,)

Dim arr1 As String() = s.Split(":"c)

Dim aOut As String(,) = New String(arr1.Length - 1, 1) {}

For i As Integer = 0 To arr1.Length - 1

Dim arr2 As String() = arr1(i).Split(";")

aOut(i, 0) = arr2(0)

aOut(i, 1) = arr2(1)


Return aOut

End Function