Question:You need to create a dynamic assembly named MyAssembly. You also need to save the assembly to disk.Which code segment should you use? 

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") 

+ Answer
+ Report
Total Preview: 877

Copyright © 2024. Powered by Intellect Software Ltd