DesignerVerbCollection DesignerVerbCollection DesignerVerbCollection DesignerVerbCollection Class

Definizione

Rappresenta una raccolta di oggetti DesignerVerb.Represents a collection of DesignerVerb objects.

public ref class DesignerVerbCollection : System::Collections::CollectionBase
[System.Runtime.InteropServices.ComVisible(true)]
public class DesignerVerbCollection : System.Collections.CollectionBase
type DesignerVerbCollection = class
    inherit CollectionBase
Public Class DesignerVerbCollection
Inherits CollectionBase
Ereditarietà
DesignerVerbCollectionDesignerVerbCollectionDesignerVerbCollectionDesignerVerbCollection
Derivato
Attributi

Esempi

Esempio di codice seguente viene illustrato come utilizzare il DesignerVerbCollection classe.The following code example demonstrates how to use the DesignerVerbCollection class. L'esempio crea una nuova istanza della classe e Usa diversi metodi per aggiungere le istruzioni per la raccolta, restituire il relativo indice e aggiungere o rimuovere gli attributi in un determinato indice specifico.The example creates a new instance of the class and uses several methods to add statements to the collection, return their index, and add or remove attributes at a specific index point.

// Creates an empty DesignerVerbCollection.
DesignerVerbCollection^ collection = gcnew DesignerVerbCollection;

// Adds a DesignerVerb to the collection.
collection->Add( gcnew DesignerVerb( "Example designer verb",gcnew EventHandler( this, &Class1::ExampleEvent ) ) );

// Adds an array of DesignerVerb objects to the collection.
array<DesignerVerb^>^ verbs = {
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ),
   gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) )};
collection->AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection^ verbsCollection = gcnew DesignerVerbCollection;
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
verbsCollection->Add( gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );
collection->AddRange( verbsCollection );

// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
int itemIndex = -1;
if ( collection->Contains( testVerb ) )
         itemIndex = collection->IndexOf( testVerb );

// Copies the contents of the collection, beginning at index 0,
// to the specified DesignerVerb array.
// 'verbs' is a DesignerVerb array.
collection->CopyTo( verbs, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

// Inserts a DesignerVerb at index 0 of the collection.
collection->Insert( 0, gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) ) );

// Removes the specified DesignerVerb from the collection.
DesignerVerb^ verb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
collection->Remove( verb );

// Removes the DesignerVerb at index 0.
collection->RemoveAt( 0 );
// Creates an empty DesignerVerbCollection.
DesignerVerbCollection collection = new DesignerVerbCollection();

// Adds a DesignerVerb to the collection.
collection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );

// Adds an array of DesignerVerb objects to the collection.
DesignerVerb[] verbs = { new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)), new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) };
collection.AddRange( verbs );

// Adds a collection of DesignerVerb objects to the collection.
DesignerVerbCollection verbsCollection = new DesignerVerbCollection();
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
verbsCollection.Add( new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );
collection.AddRange( verbsCollection );

// Tests for the presence of a DesignerVerb in the collection, 
// and retrieves its index if it is found.
DesignerVerb testVerb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
int itemIndex = -1;
if( collection.Contains( testVerb ) )
    itemIndex = collection.IndexOf( testVerb );

// Copies the contents of the collection, beginning at index 0, 
// to the specified DesignerVerb array.
// 'verbs' is a DesignerVerb array.
collection.CopyTo( verbs, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

// Inserts a DesignerVerb at index 0 of the collection.
collection.Insert( 0, new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent)) );

// Removes the specified DesignerVerb from the collection.
DesignerVerb verb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
collection.Remove( verb );

// Removes the DesignerVerb at index 0.
collection.RemoveAt(0);
' Creates an empty DesignerVerbCollection.
Dim collection As New DesignerVerbCollection()

' Adds a DesignerVerb to the collection.
collection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))

' Adds an array of DesignerVerb objects to the collection.
Dim verbs As DesignerVerb() = {New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)), New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))}
collection.AddRange(verbs)

' Adds a collection of DesignerVerb objects to the collection.
Dim verbsCollection As New DesignerVerbCollection()
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
verbsCollection.Add(New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))
collection.AddRange(verbsCollection)

' Tests for the presence of a DesignerVerb in the collection, 
' and retrieves its index if it is found.
Dim testVerb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
Dim itemIndex As Integer = -1
If collection.Contains(testVerb) Then
    itemIndex = collection.IndexOf(testVerb)
End If

' Copies the contents of the collection, beginning at index 0, 
' to the specified DesignerVerb array.
' 'verbs' is a DesignerVerb array.
collection.CopyTo(verbs, 0)

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count

' Inserts a DesignerVerb at index 0 of the collection.
collection.Insert(0, New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent)))

' Removes the specified DesignerVerb from the collection.
Dim verb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
collection.Remove(verb)

' Removes the DesignerVerb at index 0.
collection.RemoveAt(0)

Commenti

Questa classe fornisce una raccolta che può contenere DesignerVerb oggetti.This class provides a collection that can contain DesignerVerb objects.

Costruttori

DesignerVerbCollection() DesignerVerbCollection() DesignerVerbCollection() DesignerVerbCollection()

Inizializza una nuova istanza della classe DesignerVerbCollection.Initializes a new instance of the DesignerVerbCollection class.

DesignerVerbCollection(DesignerVerb[]) DesignerVerbCollection(DesignerVerb[]) DesignerVerbCollection(DesignerVerb[]) DesignerVerbCollection(DesignerVerb[])

Consente l'inizializzazione di una nuova istanza della classe DesignerVerbCollection con la matrice specificata di oggetti DesignerVerb.Initializes a new instance of the DesignerVerbCollection class using the specified array of DesignerVerb objects.

Proprietà

Capacity Capacity Capacity Capacity

Ottiene o imposta il numero di elementi che CollectionBase può contenere.Gets or sets the number of elements that the CollectionBase can contain.

(Inherited from CollectionBase)
Count Count Count Count

Ottiene il numero di elementi contenuti nell'istanza di CollectionBase.Gets the number of elements contained in the CollectionBase instance. Questa proprietà non può essere sottoposta a override.This property cannot be overridden.

(Inherited from CollectionBase)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

Ottiene un valore che indica se l'accesso a CollectionBase è sincronizzato (thread-safe).Gets a value indicating whether access to the CollectionBase is synchronized (thread safe).

(Inherited from CollectionBase)
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

Ottiene un oggetto che può essere usato per sincronizzare l'accesso a CollectionBase.Gets an object that can be used to synchronize access to the CollectionBase.

(Inherited from CollectionBase)
IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

Ottiene un valore che indica se CollectionBase ha dimensioni fisse.Gets a value indicating whether the CollectionBase has a fixed size.

(Inherited from CollectionBase)
IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly IList.IsReadOnly

Ottiene un valore che indica se CollectionBase è di sola lettura.Gets a value indicating whether the CollectionBase is read-only.

(Inherited from CollectionBase)
IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

Ottiene o imposta l'elemento in corrispondenza dell'indice specificato.Gets or sets the element at the specified index.

(Inherited from CollectionBase)
InnerList InnerList InnerList InnerList

Ottiene un ArrayList contenente l'elenco degli elementi presenti nell'istanza CollectionBase.Gets an ArrayList containing the list of elements in the CollectionBase instance.

(Inherited from CollectionBase)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Ottiene o imposta l'oggetto DesignerVerb in corrispondenza dell'indice specificato.Gets or sets the DesignerVerb at the specified index.

List List List List

Ottiene un IList contenente l'elenco degli elementi presenti nell'istanza CollectionBase.Gets an IList containing the list of elements in the CollectionBase instance.

(Inherited from CollectionBase)

Metodi

Add(DesignerVerb) Add(DesignerVerb) Add(DesignerVerb) Add(DesignerVerb)

Aggiunge l'oggetto DesignerVerb specificato alla raccolta.Adds the specified DesignerVerb to the collection.

AddRange(DesignerVerbCollection) AddRange(DesignerVerbCollection) AddRange(DesignerVerbCollection) AddRange(DesignerVerbCollection)

Aggiunge l'insieme specificato di verbi di progettazione all'insieme.Adds the specified collection of designer verbs to the collection.

AddRange(DesignerVerb[]) AddRange(DesignerVerb[]) AddRange(DesignerVerb[]) AddRange(DesignerVerb[])

Aggiunge il gruppo specificato di verbi di progettazione all'insieme.Adds the specified set of designer verbs to the collection.

Clear() Clear() Clear() Clear()

Consente di rimuovere tutti gli oggetti dall'istanza CollectionBase.Removes all objects from the CollectionBase instance. Questo metodo non può essere sottoposto a override.This method cannot be overridden.

(Inherited from CollectionBase)
Contains(DesignerVerb) Contains(DesignerVerb) Contains(DesignerVerb) Contains(DesignerVerb)

Ottiene un valore che indica se l'oggetto DesignerVerb specificato è presente nell'insieme.Gets a value indicating whether the specified DesignerVerb exists in the collection.

CopyTo(DesignerVerb[], Int32) CopyTo(DesignerVerb[], Int32) CopyTo(DesignerVerb[], Int32) CopyTo(DesignerVerb[], Int32)

Copia i membri dell'insieme nella matrice DesignerVerb specificata partendo dall'indice di destinazione specificato.Copies the collection members to the specified DesignerVerb array beginning at the specified destination index.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Restituisce un enumeratore per lo scorrimento dell'istanza di CollectionBase.Returns an enumerator that iterates through the CollectionBase instance.

(Inherited from CollectionBase)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Funge da funzione hash predefinita.Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Ottiene l'oggetto Type dell'istanza corrente.Gets the Type of the current instance.

(Inherited from Object)
IndexOf(DesignerVerb) IndexOf(DesignerVerb) IndexOf(DesignerVerb) IndexOf(DesignerVerb)

Ottiene l'indice della classe DesignerVerb specificata.Gets the index of the specified DesignerVerb.

Insert(Int32, DesignerVerb) Insert(Int32, DesignerVerb) Insert(Int32, DesignerVerb) Insert(Int32, DesignerVerb)

Inserisce l'oggetto DesignerVerb specificato in corrispondenza dell'indice specificato.Inserts the specified DesignerVerb at the specified index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.Creates a shallow copy of the current Object.

(Inherited from Object)
OnClear() OnClear() OnClear() OnClear()

Genera l'evento Clear.Raises the Clear event.

OnClearComplete() OnClearComplete() OnClearComplete() OnClearComplete()

Consente di eseguire procedure personalizzate aggiuntive prima di cancellare il contenuto dell'istanza CollectionBase.Performs additional custom processes after clearing the contents of the CollectionBase instance.

(Inherited from CollectionBase)
OnInsert(Int32, Object) OnInsert(Int32, Object) OnInsert(Int32, Object) OnInsert(Int32, Object)

Genera l'evento Insert.Raises the Insert event.

OnInsertComplete(Int32, Object) OnInsertComplete(Int32, Object) OnInsertComplete(Int32, Object) OnInsertComplete(Int32, Object)

Consente di eseguire procedure personalizzate aggiuntive dopo aver inserito un nuovo elemento nell'istanza CollectionBase.Performs additional custom processes after inserting a new element into the CollectionBase instance.

(Inherited from CollectionBase)
OnRemove(Int32, Object) OnRemove(Int32, Object) OnRemove(Int32, Object) OnRemove(Int32, Object)

Genera l'evento Remove.Raises the Remove event.

OnRemoveComplete(Int32, Object) OnRemoveComplete(Int32, Object) OnRemoveComplete(Int32, Object) OnRemoveComplete(Int32, Object)

Consente di eseguire procedure personalizzate aggiuntive dopo della rimozione di un elemento dall'istanza CollectionBase.Performs additional custom processes after removing an element from the CollectionBase instance.

(Inherited from CollectionBase)
OnSet(Int32, Object, Object) OnSet(Int32, Object, Object) OnSet(Int32, Object, Object) OnSet(Int32, Object, Object)

Genera l'evento Set.Raises the Set event.

OnSetComplete(Int32, Object, Object) OnSetComplete(Int32, Object, Object) OnSetComplete(Int32, Object, Object) OnSetComplete(Int32, Object, Object)

Consente di eseguire procedure personalizzate aggiuntive dopo aver impostato un valore nell'istanza CollectionBase.Performs additional custom processes after setting a value in the CollectionBase instance.

(Inherited from CollectionBase)
OnValidate(Object) OnValidate(Object) OnValidate(Object) OnValidate(Object)

Genera l'evento Validate.Raises the Validate event.

Remove(DesignerVerb) Remove(DesignerVerb) Remove(DesignerVerb) Remove(DesignerVerb)

Rimuove l'oggetto DesignerVerb specificato dalla raccolta.Removes the specified DesignerVerb from the collection.

RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32) RemoveAt(Int32)

Consente di rimuovere la voce in corrispondenza dell'indice specificato dell'istanza CollectionBase.Removes the element at the specified index of the CollectionBase instance. Questo metodo non può essere sottoposto a override.This method is not overridable.

(Inherited from CollectionBase)
ToString() ToString() ToString() ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.Returns a string that represents the current object.

(Inherited from Object)

Implementazioni dell'interfaccia esplicita

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)

Copia l'intero oggetto CollectionBase in un oggetto Array compatibile unidimensionale, a partire dall'indice specificato della matrice di destinazione.Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(Inherited from CollectionBase)
IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

Aggiunge un oggetto alla fine di CollectionBase.Adds an object to the end of the CollectionBase.

(Inherited from CollectionBase)
IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

Consente di stabilire se CollectionBase contiene un elemento specifico.Determines whether the CollectionBase contains a specific element.

(Inherited from CollectionBase)
IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

Cerca l'oggetto Object specificato e restituisce l'indice in base zero della prima occorrenza all'interno dell'intero CollectionBase.Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase.

(Inherited from CollectionBase)
IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

Inserisce un elemento in CollectionBase in corrispondenza dell'indice specificato.Inserts an element into the CollectionBase at the specified index.

(Inherited from CollectionBase)
IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

Rimuove la prima occorrenza di un oggetto specifico da CollectionBase.Removes the first occurrence of a specific object from the CollectionBase.

(Inherited from CollectionBase)

Metodi di estensione

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Esegue il cast degli elementi di un oggetto IEnumerable nel tipo specificato.Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filtra gli elementi di un oggetto IEnumerable in base a un tipo specificato.Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Consente la parallelizzazione di una query.Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converte un oggetto IEnumerable in un oggetto IQueryable.Converts an IEnumerable to an IQueryable.

Si applica a