Uredi

Deli z drugimi prek


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
ArrangedElementCollection
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

Gets the number of elements in the collection.

IsReadOnly

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

Methods

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)

Determines whether two ArrangedElementCollection instances are equal.

GetEnumerator()

Returns an enumerator for the entire collection.

GetHashCode()

Returns the hash code for this instance.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.IsSynchronized

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

ICollection.SyncRoot

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

IList.Add(Object)

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

IList.Clear()

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

IList.Contains(Object)

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

IList.IndexOf(Object)

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

IList.Insert(Int32, Object)

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

IList.IsFixedSize

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

IList.Item[Int32]

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

IList.Remove(Object)

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

IList.RemoveAt(Int32)

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

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

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