I am trying example from this page, but get the error:
Error 1 The type or namespace name 'MarshalByRefType' could not be found (are you missing a using directive or an assembly reference?) C:\Dropbox\development\snipplets-examples\dot.net\appdomain\MyAppDomain\MyAppDomain\Program.cs 34 13 MyAppDomain
Code:
// Create an instance of MarshalbyRefType in the second AppDomain.
// A proxy to the object is returned.
MarshalByRefType mbrt =
(MarshalByRefType) ad2.CreateInstanceAndUnwrap(
exeAssembly,
typeof(MarshalByRefType).FullName
);
The definition of the MarshalByRefType class is given in the page you’ve linked.