GlobalObjectCollection 類別

定義

全域物件的強型別集合。A strongly typed collection of global objects. 集合可以是讀寫或唯讀的。The collection can be read-write or read-only. 您可以將讀寫集合低廉價格傳遞給 GlobalObjectCollection 的函式,以建立唯讀版本而不復制集合。A read-write collection can be cheaply passed to the constructor of GlobalObjectCollection to make a read only version without copying the collection.

public ref class GlobalObjectCollection sealed : MarshalByRefObject, System::Collections::IList
public sealed class GlobalObjectCollection : MarshalByRefObject, System.Collections.IList
type GlobalObjectCollection = class
    inherit MarshalByRefObject
    interface IList
    interface ICollection
    interface IEnumerable
Public NotInheritable Class GlobalObjectCollection
Inherits MarshalByRefObject
Implements IList
繼承
GlobalObjectCollection
實作

建構函式

GlobalObjectCollection()

初始化全域物件之強型別集合的新實例。Initializes a new instance of a strongly-typed collection of global objects.

GlobalObjectCollection(GlobalObject[])

初始化全域物件的強型別集合的新實例,最初是由全域物件的陣列所填入。Initializes a new instance of a strongly-typed collection of global objects initially populated by an array of global objects.

GlobalObjectCollection(GlobalObject[], Boolean)

初始化全域物件的強型別集合的新實例,最初是由全域物件的陣列所填入。Initializes a new instance of a strongly-typed collection of global objects initially populated by an array of global objects.

GlobalObjectCollection(GlobalObjectCollection)

初始化全域物件的強型別集合的新實例,最初是由陣列填入 itemsInitializes a new instance of a strongly-typed collection of global objects initially populated by the array items.

GlobalObjectCollection(GlobalObjectCollection, Boolean)

針對指定的讀取/寫入權限,初始化指定之全域物件集合的全域物件的新實例。Initializes a new instance of global objects for the specified global object collection for the specified read/write access.

屬性

Count

傳回這個集合中的專案數。Returns the number of items in this collection.

IsFixedSize

決定是否可以變更這個集合的大小。Determines whether this collection's size can be changed.

IsReadOnly

判斷此集合是否為唯讀。Determines whether this collection is read-only.

IsSynchronized

判斷這個集合是否已同步處理多執行緒存取。Determines whether this collection is synchronized for multi-threaded access.

Item[Int32]

取得或設定指定索引處的專案。Gets or sets the item at the given index.

SyncRoot

取得要同步存取的物件。Gets the object on which to synchronize access.

方法

Add(GlobalObject)

將新項目加入至集合中。Adds a new item to the collection.

AddRange(GlobalObject[])

將陣列中的物件附加至集合的結尾。Appends the objects in an array to the end of the collection.

AddRange(GlobalObjectCollection)

將陣列中的物件附加至集合的結尾。Appends the objects in an array to the end of the collection.

Clear()

清除此集合的內容。Clears the contents of this collection.

Contains(GlobalObject)

判斷這個集合是否包含指定的專案。Determines whether this collection contains the given item.

CopyTo(GlobalObject[], Int32)

從指定的索引開始,將這個集合的內容複寫到指定的陣列。Copies the contents of this collection to the given array starting at the given index.

GetEnumerator()

傳回這個集合的列舉值。Returns an enumerator for this collection.

IndexOf(GlobalObject)

取得物件在集合中的位置。Gets the position of an object in the collection.

Insert(Int32, GlobalObject)

將新專案插入集合中指定的索引處。Inserts a new item into the collection at the given index.

Remove(GlobalObject)

從集合中移除物件。Removes an object from the collection.

RemoveAt(Int32)

從集合中指定的位置移除物件。Removes an object from the collection at the specified position.

明確介面實作

ICollection.CopyTo(Array, Int32)

從指定的索引開始,將這個集合的內容複寫到指定的陣列。Copies the contents of this collection to the given array starting at the given index.

IList.Add(Object)

將物件加入至集合。Adds an object to the collection.

IList.Contains(Object)

判斷物件是否在集合中。Determines whether an object is in the collection.

IList.IndexOf(Object)

取得物件在集合中的位置。Gets the position of an object in the collection.

IList.Insert(Int32, Object)

將專案加入至集合中指定的位置。Adds an item to the collection at the specified position.

IList.Item[Int32]
IList.Remove(Object)

從集合中移除物件。Removes an object from the collection.

適用於