EventDescriptorCollection 构造函数  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 EventDescriptorCollection 类的新实例。
重载
| EventDescriptorCollection(EventDescriptor[]) | 用给定的 EventDescriptorCollection 对象的数组初始化 EventDescriptor 类的新实例。 | 
| EventDescriptorCollection(EventDescriptor[], Boolean) | 用给定的 EventDescriptorCollection 对象的数组初始化 EventDescriptor 类的新实例。 该集合可以是只读的。 | 
EventDescriptorCollection(EventDescriptor[])
- Source:
- EventDescriptorCollection.cs
- Source:
- EventDescriptorCollection.cs
- Source:
- EventDescriptorCollection.cs
用给定的 EventDescriptorCollection 对象的数组初始化 EventDescriptor 类的新实例。
public:
 EventDescriptorCollection(cli::array <System::ComponentModel::EventDescriptor ^> ^ events);public EventDescriptorCollection (System.ComponentModel.EventDescriptor[] events);public EventDescriptorCollection (System.ComponentModel.EventDescriptor[]? events);new System.ComponentModel.EventDescriptorCollection : System.ComponentModel.EventDescriptor[] -> System.ComponentModel.EventDescriptorCollectionPublic Sub New (events As EventDescriptor())参数
- events
- EventDescriptor[]
为该集合提供事件的类型 EventDescriptor 的数组。
示例
下面的代码示例使用 上的 button1事件创建新EventDescriptorCollection类。 它要求 button1 已在窗体上实例化 。
EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );
EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);
Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(button1)
注解
              events如果 参数为空,则此构造函数将创建一个空EventDescriptorCollection类。
HostProtectionAttribute应用于此成员的属性具有以下Resources属性值:Synchronization。 HostProtectionAttribute 不影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动这些应用程序)。 有关详细信息,请参阅 HostProtectionAttribute 类或SQL Server编程和主机保护属性。
另请参阅
适用于
EventDescriptorCollection(EventDescriptor[], Boolean)
- Source:
- EventDescriptorCollection.cs
- Source:
- EventDescriptorCollection.cs
- Source:
- EventDescriptorCollection.cs
用给定的 EventDescriptorCollection 对象的数组初始化 EventDescriptor 类的新实例。 该集合可以是只读的。
public:
 EventDescriptorCollection(cli::array <System::ComponentModel::EventDescriptor ^> ^ events, bool readOnly);public EventDescriptorCollection (System.ComponentModel.EventDescriptor[] events, bool readOnly);public EventDescriptorCollection (System.ComponentModel.EventDescriptor[]? events, bool readOnly);new System.ComponentModel.EventDescriptorCollection : System.ComponentModel.EventDescriptor[] * bool -> System.ComponentModel.EventDescriptorCollectionPublic Sub New (events As EventDescriptor(), readOnly As Boolean)参数
- events
- EventDescriptor[]
为该集合提供事件的类型 EventDescriptor 的数组。
- readOnly
- Boolean
如果指定一个只读集合,则为 true;否则为 false。
示例
下面的代码示例使用 上的 button1事件创建新EventDescriptorCollection类。 它要求 button1 已在窗体上实例化 。
EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );
EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);
Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(button1)
注解
              events如果 参数为空,则此构造函数将创建一个空EventDescriptorCollection类。
注意
HostProtectionAttribute应用于此类的属性具有以下Resources属性值:Synchronization。 HostProtectionAttribute 不影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动这些应用程序)。 有关详细信息,请参阅 HostProtectionAttribute 类或SQL Server编程和主机保护属性。