I notice that there is a method of System.Reflection.Assembly, which is Assembly Load(byte[] rawAssembly).
System.Reflection.Assembly
Assembly Load(byte[] rawAssembly)
I wonder if there is an opposite ope
To convert an assembly from AppDomain to byte[] use:
var pi = assembly.GetType().GetMethod("GetRawBytes", BindingFlags.Instance | BindingFlags.NonPublic); byte[] assemblyBytes = (byte[]) pi.Invoke(assembly, null);