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.Run)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("MyAssembly.dll")
C. Dim objAssembly As New AssemblyName()objAssembly.Name =
"MyAssembly"Dim objBuilder As AssemblyBuilder =
_AppDomain.CurrentDomain.DefineDynamicAssembly( _objAssembly,
AssemblyBuilderAccess.RunAndSave)objBuilder.Save("MyAssembly.dll")
D. Dim objAssembly As New AssemblyName()objAssembly.Name =
"MyAssembly"Dim objBuilder As AssemblyBuilder =
_AppDomain.CurrentDomain.DefineDynamicAssembly( _objAssembly,
AssemblyBuilderAccess.Save)objBuilder.Save("c:\MyAssembly.dll")
Answer: B
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.Run)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("MyAssembly.dll")
C. Dim objAssembly As New AssemblyName()objAssembly.Name =
"MyAssembly"Dim objBuilder As AssemblyBuilder =
_AppDomain.CurrentDomain.DefineDynamicAssembly( _objAssembly,
AssemblyBuilderAccess.RunAndSave)objBuilder.Save("MyAssembly.dll")
D. Dim objAssembly As New AssemblyName()objAssembly.Name =
"MyAssembly"Dim objBuilder As AssemblyBuilder =
_AppDomain.CurrentDomain.DefineDynamicAssembly( _objAssembly,
AssemblyBuilderAccess.Save)objBuilder.Save("c:\MyAssembly.dll")
Answer: B
No comments:
Post a Comment