lundi 11 septembre 2017

Get Property Value from Nested Objects - Efficient Ways than Reflection

My use case can have thousands of instances of a class. One of the properties in that class is also of the same type as that of a class and this can go on and on.

So I basically have a collection of nested classes. Now if I were to search a property's value, what would my options be.

I am finding recurssion as one(Getting Nested Object Property Value Using Reflection) and an exhaustive use of GetNestedTypes(http://ift.tt/2wW5cN3) as other.

I read that reflection is expensive, so my question is, are there other ways to search the property without using reflection concept?





Aucun commentaire:

Enregistrer un commentaire