lundi 13 décembre 2021

Listing object properties using reflection, including nested lists and user defined property types

I am currently trying to create a custom UI component that simply displays all the properties of custom type object, including properties that are nested lists or other custom types. I am not sure if I have the best approach though. What I am doing now is, using reflection, I am going through the property types and display key-value pairs. If the property I am currently processing is a custom type, I iterate through its properties again and display those as well, same for lists (iterate through list, then for each object iterate through its properties and display them). Is there a better way to do this using reflection?





Aucun commentaire:

Enregistrer un commentaire