EventDescriptorCollection Konstruktorer

Definition

Initierar en ny instans av EventDescriptorCollection klassen.

Överlagringar

Name Description
EventDescriptorCollection(EventDescriptor[])

Initierar en ny instans av EventDescriptorCollection klassen med den angivna matrisen med EventDescriptor objekt.

EventDescriptorCollection(EventDescriptor[], Boolean)

Initierar en ny instans av EventDescriptorCollection klassen med den angivna matrisen med EventDescriptor objekt. Samlingen är skrivskyddad.

EventDescriptorCollection(EventDescriptor[])

Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs

Initierar en ny instans av EventDescriptorCollection klassen med den angivna matrisen med 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())

Parametrar

events
EventDescriptor[]

En matris av typen EventDescriptor som tillhandahåller händelserna för den här samlingen.

Exempel

I följande kodexempel skapas en ny EventDescriptorCollection klass med hjälp av händelserna i button1. Det kräver att button1 det har instansierats i ett formulär.

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

Kommentarer

Om parametern events är tom skapar konstruktorn en tom EventDescriptorCollection klass.

Attributet HostProtectionAttribute som tillämpas på den här medlemmen har följande Resources egenskapsvärde: Synchronization. Påverkar HostProtectionAttribute inte skrivbordsprogram (som vanligtvis startas genom att dubbelklicka på en ikon, skriva ett kommando eller ange en URL i en webbläsare). Mer information finns i klassen HostProtectionAttribute eller SQL Server Programming and Host Protection Attributes.

Se även

Gäller för

EventDescriptorCollection(EventDescriptor[], Boolean)

Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs
Källa:
EventDescriptorCollection.cs

Initierar en ny instans av EventDescriptorCollection klassen med den angivna matrisen med EventDescriptor objekt. Samlingen är skrivskyddad.

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)

Parametrar

events
EventDescriptor[]

En matris av typen EventDescriptor som tillhandahåller händelserna för den här samlingen.

readOnly
Boolean

trueför att ange en skrivskyddad samling. annars . false

Exempel

I följande kodexempel skapas en ny EventDescriptorCollection klass med hjälp av händelserna i button1. Det kräver att button1 det har instansierats i ett formulär.

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

Kommentarer

Om parametern events är tom skapar konstruktorn en tom EventDescriptorCollection klass.

Note

Attributet HostProtectionAttribute som tillämpas på den här klassen har följande Resources egenskapsvärde: Synchronization. Påverkar HostProtectionAttribute inte skrivbordsprogram (som vanligtvis startas genom att dubbelklicka på en ikon, skriva ett kommando eller ange en URL i en webbläsare). Mer information finns i klassen HostProtectionAttribute eller SQL Server Programming and Host Protection Attributes.

Se även

Gäller för