Defines a persistable dynamic module in this dynamic assembly that optionally includes symbolic information using the default symbol writer. To define a persistable dynamic module, this assembly should have been created with the AssemblyBuilderAccess.Save or the AssemblyBuilderAccess.RunAndSave attribute.
[Visual Basic] Overloads Public Function DefineDynamicModule( _ ByVal name As String, _ ByVal fileName As String, _ ByVal emitSymbolInfo As Boolean _ ) As ModuleBuilder [C#] public ModuleBuilder DefineDynamicModule( string name, string fileName, bool emitSymbolInfo ); [C++] public: ModuleBuilder* DefineDynamicModule( String* name, String* fileName, bool emitSymbolInfo ); [JScript] public function DefineDynamicModule( name : String, fileName : String, emitSymbolInfo : Boolean ) : ModuleBuilder;
Exception Type | Condition |
---|---|
ArgumentNullException | if name is null |
InvalidOperationException | if this assembly has been previously saved |
NotSupportedException | if called on a dynamic assembly with AssemblyBuilderAccess.Run attribute |
ExecutionEngineException | if the assembly for default symbol writer cannot be loaded or if the type that implements the default symbol writer interface cannot be found |
NGWS Runtime Security:
ReflectionPermission | SecurityAction.Demand, ReflectionEmit=true |
AssemblyBuilder Class | AssemblyBuilder Members | System.Reflection.Emit Namespace | AssemblyBuilder.DefineDynamicModule Overload List