c# - handle this datatype whith reflection -


i don't know how handle datatype.

object wert = x.getvalue(instanz);  list<object> element = new list<object>();  if (wert.gettype().getinterfaces().any(t => t == typeof(ienumerable))) {                                foreach (var item in wert ienumerable)     {          //this works lists, not datatype have here(see link in post)        //i "null" "y.getvalue(item)"             element.add(item.gettype().getproperties().todictionary(y => y.name, y => y.getvalue(item)));     } } 

immediate window:

wert ienumerable 

will return:

count = 1     [0]: "51000" 

here can find deeper informations: click

for y in foreach fail when hits y.getvalue(item): click

how can solve problem ?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -