You have several options:
You can go the way of using reflection, but it will be much slower than other options, and you will have to process the yoiur reflection code. Make a good general code to βcloneβ using reflection is non-trivial, especially if you need to start feeding for objects containing lists / arrays / dictionaries of other object instances.
Copy constructor, as Dr. Herbie mentioned, is one option.
Another would be to implement ICloneable for all of your types (you could implement the ICloneable interface to force all IAnimals to implement it). It may not be dynamic, like reflection (you would need to process it for each class), but assuming that you just copy the property values, it will be faster than reflection.
It is also worth considering immutability. If you can make your specific types immutable (using readonly on all fields so that they cannot be changed), you probably don't need to worry about cloning at all. Everything can happily share the same safe copy, knowing that no other specialist can modify it in any way. Such immutability can be very powerful, although you need to be careful if your interface contains collections / arrays that you can modify.
Finally, if you have many classes, you can look at the code generation for generating C # cloning classes (the task of which is to generate a clone of this type) and compile them into an assembly. You can use reflection here to create a "cloner class template", but since it generates code (which compiles with the rest of your project), you do not have time to execute a slow reflection.
Thus, there are many options for cloning - but using reflection, even if it can be naive and dynamic, is often not the best approach.
source share