I'm trying to convert this fragment of code from C# into VB.Net:
var objects = new List<dynamic>();
foreach (DataRow row in dt.Rows)
{
dynamic obj = new ExpandoObject();
foreach (DataColumn column in dt.Columns)
{
var x = (IDictionary<string, object>)obj;
x.Add(column.ColumnName, row[column.ColumnName]);
}
objects.Add(obj);
}
The problem I'm running into is trying to figure out how to create a List<dynamic>
in VB.Net. Can someone please provide some guidance on how this works in VB.Net?