Mega Code Archive

 
Categories / VB.Net / Reflection
 

Assembly GetCallingAssembly returns the Assembly of the method that invoked the currently executing method

Imports System.Reflection Class Example     Shared Sub Main()         Dim SampleAssembly As [Assembly]         Dim Integer1 As New Int32()         Dim Type1 As Type         Type1 = Integer1.GetType()         SampleAssembly = [Assembly].GetAssembly(Integer1.GetType())         Console.WriteLine(("GetCallingAssembly=" + [Assembly].GetCallingAssembly().FullName))     End Sub  End Class