Returns a Type from an already loaded Assembly or an Assembly that is loaded with a partial name.

Namespace:  NHibernate.Util
Assembly:  NHibernate (in NHibernate.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function TypeFromAssembly ( _
	name As AssemblyQualifiedTypeName, _
	throwOnError As Boolean _
) As Type
C#
public static Type TypeFromAssembly(
	AssemblyQualifiedTypeName name,
	bool throwOnError
)
Visual C++
public:
static Type^ TypeFromAssembly(
	AssemblyQualifiedTypeName^ name, 
	bool throwOnError
)
JavaScript
NHibernate.Util.ReflectHelper.typeFromAssembly = function(name, throwOnError);

Parameters

name
Type: NHibernate.Util..::.AssemblyQualifiedTypeName
An AssemblyQualifiedTypeName.
throwOnError
Type: System..::.Boolean
trueTruetruetrue (True in Visual Basic) if an exception should be thrown in case of an error, falseFalsefalsefalse (False in Visual Basic) otherwise.

Return Value

A Type object that represents the specified type, or nullNothingnullptra null reference (Nothing in Visual Basic) if the type cannot be loaded.

Remarks

Attempts to get a reference to the type from an already loaded assembly. If the type cannot be found then the assembly is loaded using Load(String).

See Also