Export (0) Print
Expand All

Assembly.GetAssembly Method

Gets the currently loaded assembly in which the specified class is defined.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

static member GetAssembly : 
        type:Type -> Assembly

Parameters

type
Type: System.Type

An object representing a class in the assembly that will be returned.

Return Value

Type: System.Reflection.Assembly
The assembly in which the specified class is defined.

ExceptionCondition
ArgumentNullException

type is a null reference (Nothing in Visual Basic).

In order to call this method, you must have a Type object, which means that the assembly in which the class is defined must already be loaded.

The following example retrieves the assembly of a specified class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft