共用方式為


ConfigurationElement.ChildElements 屬性

定義

取得目前專案的所有子專案。

public:
 property Microsoft::Web::Administration::ConfigurationChildElementCollection ^ ChildElements { Microsoft::Web::Administration::ConfigurationChildElementCollection ^ get(); };
public Microsoft.Web.Administration.ConfigurationChildElementCollection ChildElements { get; }
member this.ChildElements : Microsoft.Web.Administration.ConfigurationChildElementCollection
Public ReadOnly Property ChildElements As ConfigurationChildElementCollection

屬性值

ConfigurationChildElementCollection物件,包含目前專案的所有子專案。

備註

屬性中所 ChildElements 表示的子專案集合與方法傳回值所表示的 GetCollection 巢狀專案集合不同。 這兩個集合都包含 ConfigurationElement 物件。 不過,當您查詢組態時,應該使用 ChildElements 屬性來尋找唯一子項目,例如 system.webServer/asp 組態區段。 當您查詢包含唯一索引鍵或多重屬性索引鍵的集合元素組態時,應該使用 GetCollection 方法,例如組 system.webServer/sites 態區段

適用於