System.Runtime.InteropServices.ComSourceInterfacesAttribute Class

Identifies a list of interfaces that are exposed as COM event sources for the attributed class.

See Also: ComSourceInterfacesAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComSourceInterfacesAttribute : Attribute

Remarks

You can apply this attribute to classes.

You apply this attribute to a managed class to identify the event interfaces that the class exposes as COM connection points. An event interface contains methods that map to the event members of the class. The class event name and the interface method name must be the same. This attribute can accommodate up to four source interfaces for a class by passing the type of the source interface to the appropriate constructor, which take between one and four type arguments. For classes that want to expose more than four source interfaces, the string version of the constructor can be used. For additional information about exposing.NET events to COM clients, see [<topic://cpconraisingeventshandledbycomsink>].

Requirements

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