vendredi 4 décembre 2015

How to iterate over all the declared fields of an object of a class [duplicate]

There are many answers on stackoverflow about how to iterate through the declared fields of a class. Can I do this with an object? For example, say I want to iterate through all the fields of an object of MyClass after creation to check which fields are null (I know this is not practical). Is there any way to do this?





Aucun commentaire:

Enregistrer un commentaire