I'm having difficulties with this...

I need to return a two-dimensional string array from a web service....

It seems simple enough...

VB Code:
  1. <WebMethod> Public Function ReturnMultiDimArray() As String()()
  2.   Dim y As String()
  3.   Dim z As String()
  4.   Dim x As String()() = New String()() {y, z}
  5.   Return x
  6. End Function

However, I need to populate the two dimensions (y and z) dynamically from a datareader.

So I tried using ( ) arrayLists for y and z, and using to arraylist.ToArray method, but of course, I get an invalid cast exception when trying to build the 2-d string array:
VB Code:
  1. Dim x As String()() = New String()() {y.ToArray, z.ToArray}

I saw StringDictionary, but that doesn't serialize... and I don't want to waste hours figuring out to implement Iserializable and implenets getObject....

Any ideas?