Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Columns from LINQ List
Message
De
03/07/2011 19:46:28
 
 
À
03/07/2011 18:41:06
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01517212
Message ID:
01517226
Vues:
29
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform