convert a list(of ExpanoObject) to list of objects

63 Views Asked by At

I am trying to convert a list(of ExpanoObject) to list of objects with the code below

Dim li As List(Of ListItem) = items.Select(Of ExpandoObject)
    (Function(itm As ExpandoObject) 
     New ListItem(itm.Id, itm.Name, itm.Value)).ToList()

I got an error saying

Id, Name , Value are not members of ExpandoObjects

ListItem is a static class with static properties Id, Name, Value

What can i do to fix the issue

0

There are 0 best solutions below