Mega Code Archive

 
Categories / VB.Net / Reflection
 

Type Module Property gets the module (DLL) in which the current Type is defined

Imports System Imports Microsoft.VisualBasic Namespace MyNamespace     Class [MyClass]     End Class  End Namespace  Public Class Type_ToString_3     Public Shared Sub Main()         Try             Dim myType As Type = GetType(MyNamespace.MyClass)             Console.WriteLine(myType)             Console.WriteLine("Namespace: {0}.", myType.Namespace)             Console.WriteLine("Module: {0}.", myType.Module)             Console.WriteLine("Fully qualified type: {0}.", myType.ToString())         Catch e As Exception             Console.WriteLine("Exception: " + e.Message.ToString())         End Try     End Sub  End Class