Binding change for child objects in an object
<p>I have used this code:</p>

<pre><code> class BindChanger : System.Runtime.Serialization.SerializationBinder
{
    public override Type BindToType(string assemblyName, string typeName)
    {
        // Define the new type to bind to
        Type typeToDeserialize = null;
        // Get the current assembly
        string currentAssembly = Assembly.GetExecutingAssembly().FullName;

        // Create the new type and return it
        typeToDeserialize = Type.GetType(string.Format("{0}, {1}", typeName, currentAssembly));
        return typeToDeserialize;
    }
}
</code></pre>

<p>To Change the binder of the IFormatter object, but due to my code: (DESERIALIZER END)</p>

<pre><code>        SomeClass newSC = new SomeClass(para1, para2, para3);

        //Create Communique to send.
        Communique newComm = new Communique("Some String", "Some String", para4, "Some String", "Some String", newSC );
        Stream commS;
        commS = loginStream;
        IFormatter newBin = new BinaryFormatter();
        newBin.Binder = new BindChanger();
        newBin.Serialize(commS, newComm);
</code></pre>

<p>newSC is throwing an exception that it cannot find the assembly, now I understand that this can be thrown when deserializing over network, but I am unsure how to rebind the newSC so that it can continue deserializing the object.</p>

<p>My question is: Is there a way to change the binding of an object that is nested in another object while only the parent object is being deserialized as such? 
To my knowledge the nested object does get serialized but not directly.</p>

<p>Thanks!</p>
