通过


EventDescriptorCollection.Add(EventDescriptor) 方法

定义

将一个 EventDescriptor 添加到集合末尾。

public:
 int Add(System::ComponentModel::EventDescriptor ^ value);
public int Add(System.ComponentModel.EventDescriptor? value);
public int Add(System.ComponentModel.EventDescriptor value);
member this.Add : System.ComponentModel.EventDescriptor -> int
Public Function Add (value As EventDescriptor) As Integer

参数

value
EventDescriptor

要添加到集合中的一个 EventDescriptor

返回

集合中的位置 EventDescriptor

例外

集合为只读。

注解

注释

HostProtectionAttribute应用于此类的属性具有以下Resources属性值: SynchronizationHostProtectionAttribute 不会影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动)。 有关详细信息,请参阅 HostProtectionAttribute 类或 SQL Server 编程和主机保护属性

适用于