I'm using reflection to copy data between objects who implement the same interface, everything seems to work fine, but before deploying to production I wanted to ask: is there any reason why I should avoid doing this?
My previous implementation with hard-coded properties was not able to detect additions to the interface nor was able to avoid me or my team to mistakenly copy a property to another of the same type.
Also, I'm caching on a static dictionary the properties by type, does this have any advantage or i'm just doubling the CLR dictionary?
Aucun commentaire:
Enregistrer un commentaire