PropertyInformationCollection 類別

定義

包含 PropertyInformation 物件的集合。 此類別無法獲得繼承。

public ref class PropertyInformationCollection sealed : System::Collections::Specialized::NameObjectCollectionBase
public sealed class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase
[System.Serializable]
public sealed class PropertyInformationCollection : System.Collections.Specialized.NameObjectCollectionBase
type PropertyInformationCollection = class
    inherit NameObjectCollectionBase
[<System.Serializable>]
type PropertyInformationCollection = class
    inherit NameObjectCollectionBase
Public NotInheritable Class PropertyInformationCollection
Inherits NameObjectCollectionBase
繼承
PropertyInformationCollection
屬性

範例

下列程式代碼範例示範如何使用 PropertyInformationCollection 類別。

// Create EllementInformation object.
ElementInformation elementInfo =
  configSection.ElementInformation;
// Create a PropertyInformationCollection object.
PropertyInformationCollection propertyInfoCollection =
  elementInfo.Properties;
// Create a PropertyInformation object.
PropertyInformation myPropertyInfo =
  propertyInfoCollection["enabled"];
// Display the property value.
Console.WriteLine
  ("anonymousIdentification Section - Enabled: {0}",
  myPropertyInfo.Value);
' Create EllementInformation object.
Dim elementInfo As ElementInformation = _
configSection.ElementInformation()
' Create a PropertyInformationCollection object.
Dim propertyInfoCollection As PropertyInformationCollection = _
elementInfo.Properties()
' Create a PropertyInformation object.
Dim myPropertyInfo As PropertyInformation = _
  propertyInfoCollection("enabled")
' Display the property value.
Console.WriteLine _
  ("anonymousIdentification Section - Enabled: {0}", _
  myPropertyInfo.Value)

備註

PropertyInformationCollection物件包含物件的集合PropertyInformationPropertyInformation物件包含組態中個別屬性的詳細數據。 物件 PropertyInformationCollection 衍生自相關聯的 NameObjectCollectionBase 物件。

屬性

Count

取得 NameObjectCollectionBase 執行個體中包含的索引鍵/值組數目。

(繼承來源 NameObjectCollectionBase)
IsReadOnly

取得或設定值,表示 NameObjectCollectionBase 執行個體是否為唯讀。

(繼承來源 NameObjectCollectionBase)
Item[String]

根據指定之屬性名稱取得集合中的 PropertyInformation 物件。

Keys

取得 NameObjectCollectionBase.KeysCollection 執行個體,其中包含 NameObjectCollectionBase 執行個體內的所有索引鍵。

(繼承來源 NameObjectCollectionBase)

方法

BaseAdd(String, Object)

將具有指定索引鍵和值的項目加入 NameObjectCollectionBase 執行個體。

(繼承來源 NameObjectCollectionBase)
BaseClear()

將所有項目從 NameObjectCollectionBase 執行個體中移除。

(繼承來源 NameObjectCollectionBase)
BaseGet(Int32)

取得 NameObjectCollectionBase 執行個體指定索引處之項目的值。

(繼承來源 NameObjectCollectionBase)
BaseGet(String)

NameObjectCollectionBase 執行個體取得具有指定索引鍵之第一個項目的值。

(繼承來源 NameObjectCollectionBase)
BaseGetAllKeys()

傳回 String 陣列,其中包含 NameObjectCollectionBase 執行個體中的所有索引鍵。

(繼承來源 NameObjectCollectionBase)
BaseGetAllValues()

傳回 Object 陣列,其中包含 NameObjectCollectionBase 執行個體中的所有值。

(繼承來源 NameObjectCollectionBase)
BaseGetAllValues(Type)

傳回指定類型的陣列,其中包含 NameObjectCollectionBase 執行個體中的所有值。

(繼承來源 NameObjectCollectionBase)
BaseGetKey(Int32)

取得 NameObjectCollectionBase 執行個體指定索引處之項目的索引鍵。

(繼承來源 NameObjectCollectionBase)
BaseHasKeys()

取得值,表示 NameObjectCollectionBase 執行個體是否包含其索引鍵不是 null 的項目。

(繼承來源 NameObjectCollectionBase)
BaseRemove(String)

將具有指定索引鍵的項目從 NameObjectCollectionBase 中移除。

(繼承來源 NameObjectCollectionBase)
BaseRemoveAt(Int32)

移除 NameObjectCollectionBase 執行個體指定索引處的項目。

(繼承來源 NameObjectCollectionBase)
BaseSet(Int32, Object)

設定 NameObjectCollectionBase 執行個體指定索引處之項目的值。

(繼承來源 NameObjectCollectionBase)
BaseSet(String, Object)

設定 NameObjectCollectionBase 執行個體中具有指定索引鍵之第一個項目的值 (如果有找到),否則將具有指定索引鍵和值的項目加入 NameObjectCollectionBase 執行個體。

(繼承來源 NameObjectCollectionBase)
CopyTo(PropertyInformation[], Int32)

從目標陣列的指定之索引開始,將整個 PropertyInformationCollection 集合複製到相容的一維 Array

Equals(Object)

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

(繼承來源 Object)
GetEnumerator()

取得 IEnumerator 物件,這個物件用來逐一查看這個 PropertyInformationCollection 集合。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

將序列化 SerializationInfo 執行個體所需的資料填入 PropertyInformationCollection 物件中。

GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

實作 ISerializable 介面,並傳回序列化 NameObjectCollectionBase 執行個體所需的資料。

(繼承來源 NameObjectCollectionBase)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnDeserialization(Object)

實作 ISerializable 介面,並於還原序列化完成時引發還原序列化事件。

(繼承來源 NameObjectCollectionBase)
ToString()

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

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

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

(繼承來源 NameObjectCollectionBase)
ICollection.IsSynchronized

取得值,表示是否要同步處理 (執行緒安全) 對 NameObjectCollectionBase 物件的存取。

(繼承來源 NameObjectCollectionBase)
ICollection.SyncRoot

取得可用來同步處理對 NameObjectCollectionBase 物件之存取的物件。

(繼承來源 NameObjectCollectionBase)

擴充方法

Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

適用於

另請參閱