samedi 13 août 2016

Get every object embedded or base of a certain type

I have a complex object that contains many properties, many of those properties are of other complex types. In a response I will initialise each object and populate them and their values starting with the lowest/most dependent objects first. Once I've done that I then return the object via a HttpReponseMessage.

I want using reflection and recursion (and I am aware that theyre both extremely taxing to the system) to retrieve every property of type DateTime. I want to receive the properties of DatetTime for all embedded complex objects or base objects.

How can I ensure that I will catch every single datetime property from many nested/embedded object?





Aucun commentaire:

Enregistrer un commentaire