I am trying to create list of object using inline code.
Dim lstPopupProps As New List(Of Object)(New Object() With {.Name = "", .Age = 20})
but I am getting an error
Object initializer object cannot be use to initialize an instance of System.Object
Is there any way to create list of object like this or I will have to add objects one by one?