Knight Data Access Layer
GetTypeFromAssembly Method




KellermanSoftware.NetDataAccessLayer Namespace > ReflectionHelper Class : GetTypeFromAssembly Method
Returns a System.Type from an already loaded Assembly or an Assembly that is loaded with a partial name.
Syntax
Public Shared Function GetTypeFromAssembly( _
   ByVal typeName As String, _
   ByVal assemblyName As String, _
   ByVal throwOnError As Boolean _
) As Type
Dim typeName As String
Dim assemblyName As String
Dim throwOnError As Boolean
Dim value As Type
 
value = ReflectionHelper.GetTypeFromAssembly(typeName, assemblyName, throwOnError)
public static Type GetTypeFromAssembly( 
   string typeName,
   string assemblyName,
   bool throwOnError
)
public: static Type* GetTypeFromAssembly( 
   string* typeName,
   string* assemblyName,
   bool throwOnError
) 
public:
static Type^ GetTypeFromAssembly( 
   String^ typeName,
   String^ assemblyName,
   bool throwOnError
) 

Parameters

typeName
assemblyName
throwOnError

Return Value

A System.Type object that represents the specified type, or a 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 System.Reflection.Assembly.Load(System.String).
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReflectionHelper Class
ReflectionHelper Members