Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting Columns from LINQ List
Message
From
03/07/2011 19:00:42
 
 
To
03/07/2011 18:41:06
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01517212
Message ID:
01517224
Views:
32
ooohhhh keyyyyyy

Can Someone explain that one to me?

You are correct the design plattform does not show an error anymore. I'll have to test the whole code now to see if I run into any other errors.

But I don't understand that.

I know that the "(of T)" expects a type (such as integer, varchar, etc...

since "T" is not a type I understood the occurance of the error - just didn't know how to fix it.

But all you did was to add another "(Of T)" - now i am defently lost.

I was already way lost before - but now ... lol


Thank you much for that help!


>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform