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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -