Sdílet prostřednictvím


EventDescriptorCollection Konstruktory

Definice

Inicializuje novou instanci EventDescriptorCollection třídy.

Přetížení

Name Description
EventDescriptorCollection(EventDescriptor[])

Inicializuje novou instanci EventDescriptorCollection třídy s daným polem EventDescriptor objektů.

EventDescriptorCollection(EventDescriptor[], Boolean)

Inicializuje novou instanci EventDescriptorCollection třídy s daným polem EventDescriptor objektů. Kolekce je volitelně jen pro čtení.

EventDescriptorCollection(EventDescriptor[])

Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs

Inicializuje novou instanci EventDescriptorCollection třídy s daným polem EventDescriptor objektů.

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.EventDescriptorCollection
Public Sub New (events As EventDescriptor())

Parametry

events
EventDescriptor[]

Pole typu EventDescriptor , které poskytuje události pro tuto kolekci.

Příklady

Následující příklad kódu vytvoří novou EventDescriptorCollection třídu pomocí událostí na button1. Vyžaduje vytvoření button1 instance formuláře.

EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );
_ = TypeDescriptor.GetEvents(button1);
Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(button1)

Poznámky

events Pokud je parametr prázdný, tento konstruktor vytvoří prázdnou EventDescriptorCollection třídu.

Atribut HostProtectionAttribute použitý pro tohoto člena má následující Resources hodnotu vlastnosti: Synchronization. Nemá HostProtectionAttribute vliv na desktopové aplikace (které se obvykle spouští poklikáním na ikonu, zadáním příkazu nebo zadáním adresy URL v prohlížeči). Další informace naleznete v HostProtectionAttribute tématu třídy nebo programování SYSTÉMU SQL Server a atributy ochrany hostitele.

Viz také

Platí pro

EventDescriptorCollection(EventDescriptor[], Boolean)

Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs
Zdroj:
EventDescriptorCollection.cs

Inicializuje novou instanci EventDescriptorCollection třídy s daným polem EventDescriptor objektů. Kolekce je volitelně jen pro čtení.

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.EventDescriptorCollection
Public Sub New (events As EventDescriptor(), readOnly As Boolean)

Parametry

events
EventDescriptor[]

Pole typu EventDescriptor , které poskytuje události pro tuto kolekci.

readOnly
Boolean

trueurčit kolekci určenou jen pro čtení; v opačném případě . false

Příklady

Následující příklad kódu vytvoří novou EventDescriptorCollection třídu pomocí událostí na button1. Vyžaduje vytvoření button1 instance formuláře.

EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );
_ = TypeDescriptor.GetEvents(button1);
Dim events As EventDescriptorCollection = TypeDescriptor.GetEvents(button1)

Poznámky

events Pokud je parametr prázdný, tento konstruktor vytvoří prázdnou EventDescriptorCollection třídu.

Poznámka:

Atribut HostProtectionAttribute použitý pro tuto třídu má následující Resources hodnotu vlastnosti: Synchronization. Nemá HostProtectionAttribute vliv na desktopové aplikace (které se obvykle spouští poklikáním na ikonu, zadáním příkazu nebo zadáním adresy URL v prohlížeči). Další informace naleznete v HostProtectionAttribute tématu třídy nebo programování SYSTÉMU SQL Server a atributy ochrany hostitele.

Viz také

Platí pro