Loads the specified assembly for the provided name and reflection value. Namespace: Microsoft.ConfigurationManagement.AdminConsole.Common
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)

Usage

Visual Basic
Dim assemblyName As String
Dim reflectOnly As Boolean
Dim returnValue As Assembly

returnValue = UtilityClass.LoadAssemblyByName(assemblyName, reflectOnly)

Syntax

Visual Basic
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name:="FullTrust")> _
<PermissionSetAttribute(SecurityAction.LinkDemand, Name:="FullTrust")> _
Public Shared Function LoadAssemblyByName ( _
		assemblyName As String, _
		reflectOnly As Boolean _
) As Assembly
C#
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name="FullTrust")] 
[PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] 
public static Assembly LoadAssemblyByName (
		string assemblyName,
		bool reflectOnly
)
C++
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name=L"FullTrust")] 
[PermissionSetAttribute(SecurityAction::LinkDemand, Name=L"FullTrust")] 
public:
static Assembly^ LoadAssemblyByName (
		String^ assemblyName, 
		bool reflectOnly
)
J#
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name="FullTrust") */ 
/** @attribute PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust") */ 
public static Assembly LoadAssemblyByName (
		String assemblyName, 
		boolean reflectOnly
)
JScript
public static function LoadAssemblyByName (
		assemblyName : String, 
		reflectOnly : boolean
) : Assembly

Parameters

assemblyName

[in] Name of an assembly.

reflectOnly

[in] true to load the assembly for reflection only.

Return Value

System.Reflection.Assembly object that represents the loaded assembly.

Exceptions

Exception type Condition
InvalidOperationException

The requested assembly could not be loaded.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also