mardi 14 juin 2016

Get collection from object

In C#/.Net is there a way to reflect from an object, which is a member of a collection up to the collection itself so we can (a) iterate over the other members of the collection, and (b) assuming the collection is itself a member of a collection follow the tree back up to the root?

A typical example would be if there is a common attribute which can be set at multiple levels the collection tree and when an object is changed, find the nearest trunk entry.





Aucun commentaire:

Enregistrer un commentaire