System.Runtime.InteropServices.RegistrationServices.RegisterAssembly Method

Registers the classes in a managed assembly to enable creation from COM.

Syntax

public virtual bool RegisterAssembly (System.Reflection.Assembly assembly, AssemblyRegistrationFlags flags)

Parameters

assembly
The assembly to be registered.
flags
An System.Runtime.InteropServices.AssemblyRegistrationFlags value indicating any special settings used when registering assembly.

Returns

true if assembly contains types that were successfully registered; otherwise false if the assembly contains no eligible types.

Remarks

RegisterAssembly adds the appropriate registry entries for the types in the specified assembly. This method also calls any registration functions found in the assembly.

Use System.Reflection.Assembly.Load(string) to get an assembly.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0