MarcinJuraszek / CloneExtensions

Clone extension method library. Performs fast, deep or shallow clone using simple assignment operations generated by Expression Tree runtime code compilation.
Apache License 2.0
115 stars 30 forks source link

Runtime mapping #34

Open cjmairair opened 5 years ago

cjmairair commented 5 years ago

You need to look at the runtime type of the source members and use that.

This goes for the initial source object, and all of its inner descendants. You can't just say, "well I don't know what to do if the source (declared) type is abstract or an interface". You have to look at the runtime type of the source object and use that type.

Saratsin commented 5 years ago

dynamic actually solving this problem