dimanche 17 janvier 2016

How to generically populate an object if the field names are provided?

If I need to create and populate an object inside a method, with the only info as metadata is the member field name passed as string, and the relevant value for that field passed as an Object what is the most appropriate design pattern for it taking into account performance (meaning that reflection if comes with a penalty would not be a preferred approach).

Aucun commentaire:

Enregistrer un commentaire