A Dim objAssembly As New AssemblyName() objAssembly.Name = "MyAssembly" Dim objBuilder As AssemblyBuilder = _ AppDomain.CurrentDomain.DefineDynamicAssembly( _ objAssembly, AssemblyBuilderAccess.Save) objBuilder.Save("MyAssembly.dll")
B Dim objAssembly As New AssemblyName() objAssembly.Name = "MyAssembly" Dim objBuilder As AssemblyBuilder = _ AppDomain.CurrentDomain.DefineDynamicAssembly( _ objAssembly, AssemblyBuilderAccess.Save) objBuilder.Save("c:\MyAssembly.dll")
C Dim objAssembly As New AssemblyName() objAssembly.Name = "MyAssembly" Dim objBuilder As AssemblyBuilder = _ AppDomain.CurrentDomain.DefineDynamicAssembly( _ objAssembly, AssemblyBuilderAccess.Run) objBuilder.Save("MyAssembly.dll")
D Dim objAssembly As New AssemblyName() objAssembly.Name = "MyAssembly" Dim objBuilder As AssemblyBuilder = _ AppDomain.CurrentDomain.DefineDynamicAssembly( _ objAssembly, AssemblyBuilderAccess.RunAndSave) objBuilder.Save("MyAssembly.dll")