Thank you Bonnie
That solved all my problems - my complete code now works - and it is dynamic - which is the important part.
Thank you very much - i still don't understand it (as i described in my other post), mut hey - its working!
>
>I don't think this works since the error (in the vs before starting the debug) if in the ToDataTable() function.
>>
>> Public Shared Function ToDataTable(ByVal data As IList(Of T)) As DataTable
>>
>>the above shows an error at the "T">
>Perhaps that's not the correct VB syntax? I don't know, I've tried a couple of the online converters (going in both directions VB to C# and C# to VB) and they seem to have issues with generics. In C#, I believe the method signature would look like this:
>
>
public static DataTable ToDataTable<T>(IList<T> data)
>
>Actually, I think I've found one converter that may work. Try the following syntax instead:
>
>
Public Shared Function ToDataTable(Of T)(data As IList(Of T)) As DataTable
>End Function
>
>If this works, then this converter is much better than the ones I've been using. It can be found at:
>
http://www.developerfusion.com/tools/convert/csharp-to-vb/>
http://www.developerfusion.com/tools/convert/vb-to-csharp/>
>~~Bonnie