Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process.
See Also: ComUnregisterFunctionAttribute Members
You can apply this attribute to methods.
System.Runtime.InteropServices.ComUnregisterFunctionAttribute enables you to add code that reverses the operations performed by a registration method. If you apply the System.Runtime.InteropServices.ComRegisterFunctionAttribute to provide a registration method, you must also provide an unregistration method to reverse the operations done in the registration method. You can have only one unregistration method for a class.
The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [<topic://cpgrfassemblyregistrationtoolregasmexe>] or through the RegistrationServices.UnregisterAssembly(System.Reflection.Assembly) API method. Methods with this attribute can have any visibility (public, private, and so on), but must be static and must take a single Type parameter for the Type to unregister.