Hi,
I'm trying to write a function that returns an Array that I can pass into a String.Format:
Public Function ToArray() As Array
Dim vals As New ArrayList()
vals.Add(Me("district"))
vals.Add(Me("county"))
vals.Add(Me("route"))
vals.Add(Me("section"))
vals.Add(Me("beg_logmile"))
vals.Add(Me("end_logmile"))
vals.Add(Me("date_logged"))
vals.Add(Me("year_installed").year())
vals.Add(Me("document"))
Return vals.ToArray()
End Function
Public Overrides Function toString() As String
Return String.Format("{0} {1} {2} {3} {4:f3} {5:f3} {6} {7} {8}", Me.ToArray())
End Function
The above does not work. I've converted it to just String.Format("{0}", Me.ToArray()) and it tells me that I've got a System.Object[]
I haven't been able to find an answer yet on Google or SO, so any help would be appreciated!