ArrangedElementCollection ArrangedElementCollection ArrangedElementCollection ArrangedElementCollection Class

Definition

Represents a collection of objects.

public ref class ArrangedElementCollection : System::Collections::IList
public class ArrangedElementCollection : System.Collections.IList
type ArrangedElementCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class ArrangedElementCollection
Implements IList
Inheritance
ArrangedElementCollectionArrangedElementCollectionArrangedElementCollectionArrangedElementCollection
Derived
Implements

Remarks

The ArrangedElementCollection class represents a collection of objects arranged on a design surface or inside a parent System.Windows.Forms.ContainerControl.

There are no publicly defined constructors in ArrangedElementCollection because it is designed to be used only internally within the .NET Framework. However, classes derived from ArrangedElementCollection, such as System.Windows.Forms.Control.ControlCollection, are available to the developer.

Properties

Count Count Count Count

Gets the number of elements in the collection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value indicating whether the collection is read-only.

Methods

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

Copies the entire contents of this collection to a compatible one-dimensional Array, starting at the specified index of the target array.

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

Determines whether two ArrangedElementCollection instances are equal.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator for the entire collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized

For a description of this member, see the IsSynchronized property.

ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot

For a description of this member, see the SyncRoot property.

IList.Add(Object) IList.Add(Object) IList.Add(Object) IList.Add(Object)

For a description of this member, see the Add(Object) method.

IList.Clear() IList.Clear() IList.Clear() IList.Clear()

For a description of this member, see the Clear() method.

IList.Contains(Object) IList.Contains(Object) IList.Contains(Object) IList.Contains(Object)

For a description of this member, see the Contains(Object) method.

IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object) IList.IndexOf(Object)

For a description of this member, see the IndexOf(Object) method.

IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object) IList.Insert(Int32, Object)

For a description of this member, see the Insert(Int32, Object) method.

IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize IList.IsFixedSize

For a description of this member, see the IsFixedSize property.

IList.Item[Int32] IList.Item[Int32] IList.Item[Int32] IList.Item[Int32]

For a description of this member, see the Item[Int32] property.

IList.Remove(Object) IList.Remove(Object) IList.Remove(Object) IList.Remove(Object)

For a description of this member, see the Remove(Object) method.

IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32) IList.RemoveAt(Int32)

For a description of this member, see the RemoveAt(Int32) method.

Extension Methods

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

Casts the elements of an IEnumerable to the specified type.

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

Filters the elements of an IEnumerable based on a specified type.

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

Enables parallelization of a query.

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

Converts an IEnumerable to an IQueryable.

Applies to

Thread Safety

Public static (Shared in Visual Basic) members of this type are thread safe. Instance members are not guaranteed to be thread safe.

An ArrangedElementCollection can support multiple readers concurrently, as long as the collection is not modified. The GetEnumerator() method returns an IEnumerator that can be used to access elements.

Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.

See also