O'Reilly logo

VB.NET Core Classes in a Nutshell by Ted Neward, Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 : Inherits System.Reflection.Module
' Public Instance Properties
   Overrides Public ReadOnly Property FullyQualifiedName As String  
' Public Instance Methods
   Public Sub CreateGlobalFunctions() 
   Public Function DefineDocument(ByVal url As String, 
        ByVal language As Guid, 
        ByVal languageVendor As Guid, 
        ByVal documentType As Guid) As ISymbolDocumentWriter  
   Public Function DefineEnum(ByVal name As String, 
        ByVal visibility As System.Reflection.TypeAttributes, 
        ByVal underlyingType As Type) As EnumBuilder  
   Public Function DefineGlobalMethod(ByVal name As String, 
        ByVal attributes As System.Reflection.MethodAttributes, 
        ByVal callingConvention As System.Reflection.CallingConventions, 
        ByVal returnType As Type, 
        ByVal parameterTypes As Type()) As MethodBuilder  
   Public Function DefineGlobalMethod(ByVal name As String, ByVal attributes As System.Reflection.MethodAttributes, ByVal returnType As Type, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required