ArrangedElementCollection ArrangedElementCollection ArrangedElementCollection ArrangedElementCollection Class

定義

表示物件的集合。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
繼承
ArrangedElementCollectionArrangedElementCollectionArrangedElementCollectionArrangedElementCollection
衍生
實作

備註

ArrangedElementCollection類別代表設計介面上或在父代內排列物件的集合System.Windows.Forms.ContainerControlThe ArrangedElementCollection class represents a collection of objects arranged on a design surface or inside a parent System.Windows.Forms.ContainerControl.

有沒有公開定義的建構函式ArrangedElementCollection因為它設計用於只能在內部內.NET Framework.NET FrameworkThere are no publicly defined constructors in ArrangedElementCollection because it is designed to be used only internally within the .NET Framework.NET Framework. 不過,類別衍生自ArrangedElementCollection,例如System.Windows.Forms.Control.ControlCollection,可用於開發人員。However, classes derived from ArrangedElementCollection, such as System.Windows.Forms.Control.ControlCollection, are available to the developer.

屬性

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.

方法

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

從目標陣列的指定之索引處開始,將這個集合的整個內容複製到相容的一維 ArrayCopies 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)

判斷兩個 ArrangedElementCollection 執行個體是否相等。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()

取得目前執行個體的 TypeGets the Type of the current instance.

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

建立目前 Object 的淺層複本 (Shallow Copy)。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)

明確介面實作

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

如需這個成員的描述,請參閱 IsSynchronized 屬性。For a description of this member, see the IsSynchronized property.

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

如需這個成員的描述,請參閱 SyncRoot 屬性。For a description of this member, see the SyncRoot property.

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

如需這個成員的描述,請參閱 Add(Object) 方法。For a description of this member, see the Add(Object) method.

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

如需這個成員的描述,請參閱 Clear() 方法。For a description of this member, see the Clear() method.

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

如需這個成員的描述,請參閱 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)

如需這個成員的描述,請參閱 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)

如需這個成員的描述,請參閱 Insert(Int32, Object) 方法。For a description of this member, see the Insert(Int32, Object) method.

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

如需這個成員的描述,請參閱 IsFixedSize 屬性。For a description of this member, see the IsFixedSize property.

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

如需這個成員的描述,請參閱 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)

如需這個成員的描述,請參閱 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)

如需這個成員的描述,請參閱 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)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

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

根據指定的型別來篩選 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)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

適用於

執行緒安全性

公用static(Shared Visual Basic 中) 的這種類型的成員都是安全執行緒。Public static (Shared in Visual Basic) members of this type are thread safe. 不保證執行個體成員安全執行緒。Instance members are not guaranteed to be thread safe.

ArrangedElementCollection可支援多個讀取器同時,只要不修改集合。An ArrangedElementCollection can support multiple readers concurrently, as long as the collection is not modified. GetEnumerator()方法會傳回IEnumerator,可用來存取項目。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.

另請參閱