Hi Christopher,
try something liek this:
Sub Main()
Dim s(,) As String
s = MyMethod()
Dim i, j As Int32
For i = 0 To s.GetUpperBound(0)
For j = 0 To s.GetUpperBound(1)
Console.WriteLine(s(i, j))
Next
Next
End Sub
Public Function MyMethod() As String(,)
Dim MyS(2, 2) As String
Dim i, j As Int32
For i = 0 To 2
For j = 0 To 2
MyS(i, j) = "Item : " & CStr(i) & ", " & CStr(j)
Next
Next
Return MyS
End Function
Quote:
> This is an extremely easy question but haven't done VB in quite some time.
> I have a method that returns a two-dimensional array of strings. How can
i
> populate a variable in VB with that 2-D Array? I tried the followin gbut
> not sure of the syntax and the .net documentation doesnt have a VB example
> it seems.
> Dim pages(,) As String
> pages = MyObject.MyMethod()
> thanks so much!