I have a requirement to map all of the field values and child collections between ObjectV1 and ObjectV2 by field name. ObjectV2 is in a different namspace to ObjectV1.
If if you control the instantiation of the destination object, try using JavaScriptSerializer. It doesn't spit out any type information.
new JavaScriptSerializer().Serialize(new NamespaceA.Person{Id = 1, Name = "A"})
returns
{Id: 1, Name: "A"}
From this it should possible to deserialize any class with the same property names.
As an alternative to using reflection every time, you could create a helper class which dynamically creates copy methods using Reflection.Emit - this would mean you only get the performance hit on startup. This may give you the combination of flexibility and performance that you need.
As Reflection.Emit is quite clunky, I would suggest checking out this Reflector addin, which is brilliant for building this sort of code.
If speed is an issue, you should implement clone methods in the methods themselves.
You might want to take a look at AutoMapper, a library which specializes in copying values between objects. It uses convention over configuration, so if the properties really have the exaxt same names it will do almost all of the work for you.
What version of .NET is it?
For shallow copy:
In 3.5, you can pre-compile an Expression to do this. In 2.0, you can use HyperDescriptor very easily to do the same. Both will vastly out-perform reflection.
There is a pre-canned implementation of the Expression approach in MiscUtil - PropertyCopy:
DestType clone = PropertyCopy<DestType>.CopyFrom(original);
(end shallow)
BinaryFormatter (in the question) is not an option here - it simply won't work since the original and destination types are different. If the data is contract based, XmlSerializer or DataContractSerializer would work if all the contract-names match, but the two (shallow) options above would be much quicker if they are possible.
Also - if your types are marked with common serialization attributes (XmlType or DataContract), then protobuf-net can (in some cases) do a deep-copy / change-type for you:
DestType clone = Serializer.ChangeType<OriginalType, DestType>(original);
But this depends on the types having very similar schemas (in fact, it doesn't use the names, it uses the explicit "Order" etc on the attributes)
If speed is an issue you could take the reflection process offline and generate code for the mapping of the common properties. You could do this at runtime using Lightweight Code Generation or completely offline by building C# code to compile.