Name

ComRegisterFunctionAttribute

Synopsis

This attribute is attached to a static method to indicate that it should be invoked when the enclosing assembly is registered with COM. The method should take two string arguments. The first is the name of the registry key being updated, and the second is the namespace-qualified name of the type being registered (such as System.String). There can only be one registration function in each assembly.

Microsoft suggests that you do not use this feature and includes it only for backward compatibility. If you use this feature to specify a registration method, you must also specify an unregistration method (see ComUnregisterFunctionAttribute) that reverses all changes you made in the registration function.

public sealed class ComRegisterFunctionAttribute : Attribute {
// Public Constructors
   public ComRegisterFunctionAttribute( );
}

Hierarchy

System.Object System.Attribute ComRegisterFunctionAttribute

Valid On

Method

Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.