Name
ModuleBuilder
Synopsis
This class represents a dynamically
created module inside a
dynamic assembly. Dynamic modules are created with the
AssemblyBuilder.DefineDynamicModule( )
method. A
dynamic module can be either transient or persistable, which means
you can save it to disk as part of a PE file. To create a persistable
module, use a version of the
AssemblyBuilder.DefineDynamicModule( )
method that
allows you to specify a filename.
You can use the methods that begin with Define
to
create types, managed and unmanaged resources, global methods, and
PInvoke
(global native) methods.
public class ModuleBuilder : System.Reflection.Module { // Public Instance Properties public override string FullyQualifiedName{get; } // overrides System.Reflection.Module // Public Instance Methods public void CreateGlobalFunctions( ); public ISymbolDocumentWriter DefineDocument(stringurl
, Guidlanguage
, GuidlanguageVendor
, GuiddocumentType
); public EnumBuilder DefineEnum(stringname
, System.Reflection.TypeAttributesvisibility
, TypeunderlyingType
); public MethodBuilder DefineGlobalMethod(stringname
, System.Reflection.MethodAttributesattributes
, System.Reflection.CallingConventionscallingConvention
,TypereturnType
, Type[ ]parameterTypes
); public MethodBuilder DefineGlobalMethod(stringname
, System.Reflection.MethodAttributesattributes
, TypereturnType
, Type[ ]parameterTypes
); public FieldBuilder DefineInitializedData(stringname
, byte[ ]data
, System.Reflection.FieldAttributesattributes ...
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.