Alright, I'm not sure if this question has been asked before so if it has then flame away. Lets say we have two classes like this
[Serializable]
public class ClassA
{
private string _name;
private ClassB _data;
}
public class ClassB : MarshalByRefObject
{
public string GetAppDomainName()
{
return AppDomain.Current.FriendlyName;
}
}
As you can see ClassA holds a reference to ClassB but class B inherits from the MarshalByRefObject class. My question is when I attempt to pass ClassA to another AppDomain how can I get ClassA to serialize the way it normally would except pass the _data field over to the new AppDomain as a transparent proxy?
Any help is appreciated :)