NameObjectCollectionBase.KeysCollection 類別

定義

代表集合的 String 索引鍵集合。

public: ref class NameObjectCollectionBase::KeysCollection : System::Collections::ICollection
public class NameObjectCollectionBase.KeysCollection : System.Collections.ICollection
[System.Serializable]
public class NameObjectCollectionBase.KeysCollection : System.Collections.ICollection
type NameObjectCollectionBase.KeysCollection = class
    interface ICollection
    interface IEnumerable
[<System.Serializable>]
type NameObjectCollectionBase.KeysCollection = class
    interface ICollection
    interface IEnumerable
Public Class NameObjectCollectionBase.KeysCollection
Implements ICollection
繼承
NameObjectCollectionBase.KeysCollection
屬性
實作

屬性

Count

取得 NameObjectCollectionBase.KeysCollection 中的索引鍵數目。

Item[Int32]

取得在集合的指定索引處的項目。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
Get(Int32)

取得在集合的指定索引處的索引鍵。

GetEnumerator()

傳回在 NameObjectCollectionBase.KeysCollection 中逐一查看的列舉值。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

從目標陣列的指定索引開始,將整個 NameObjectCollectionBase.KeysCollection 複製到相容的一維 Array

ICollection.IsSynchronized

取得值,這個值表示對 NameObjectCollectionBase.KeysCollection 的存取是否同步 (安全執行緒)。

ICollection.SyncRoot

取得可用以同步存取 NameObjectCollectionBase.KeysCollection 的物件。

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

適用於

執行緒安全性

Visual Basic 中的公用靜態 (Shared) 此類型的成員是安全線程。 並非所有的執行個體成員都是安全執行緒。

這個實作不提供的同步處理 (執行緒安全) 包裝 NameObjectCollectionBase.KeysCollection 函式,但衍生類別可以使用 屬性建立自己的同步版本 NameObjectCollectionBase.KeysCollectionSyncRoot

透過集合進行列舉在本質上並非安全執行緒程序。 即使集合經過同步化,其他的執行緒仍可修改該集合,使列舉值擲回例外狀況。 若要保證列舉過程的執行緒安全,您可以在整個列舉過程中鎖定集合,或攔截由其他執行緒的變更所造成的例外狀況。