I have read many posts on this topic; among them and most recently .NET - Convert Generic Collection to Data Table. Unfortunately, all to no avail.
I have a generic collection of structures :
Private Structure MyStruct
Dim sState as String
Dim lValue as Long
Dim iLayer as Integer
End Structure
Dim LOStates As New List(Of MyStruct)
I need to fill a DataTable with this list of structures but have no idea how to go about doing this. I am using vb.net in Visual Studio 2008.
Any insights will be greatly appreciated
I have same issue than @SamSelikoff, moved to GetProperties:
The code you linked assumes the members are declared as properties. You didn't declare properties. You can make it work with Reflection: