2
Answers

using reflection to work with list of item in object

Space Ghost

Space Ghost

13y
2.6k
1

hi all,
i am fearly new to reflection but seems to go good so far. i only have a question and hope you guys can help. With the following line of code:

object oo = mInfo.Invoke(myinst, null);

the 'oo' object is populated with the results that I am after. it holds a list of poeple and each person has name, surname and age. how is it possible now to loop through the oo object(list of 'Person') and get a handle on each of their properties(name, surname and age)?


thanks,
Answers (2)