ConfigurationSectionGroup.IsDeclared プロパティ

定義

ConfigurationSectionGroup オブジェクトが宣言されているかどうかを示す値を取得します。

public:
 property bool IsDeclared { bool get(); };
public bool IsDeclared { get; }
member this.IsDeclared : bool
Public ReadOnly Property IsDeclared As Boolean

プロパティ値

この ConfigurationSectionGroup が宣言されている場合は true。それ以外の場合は false。 既定値は、false です。

次のコード例では、 のこのインスタンス ConfigurationSectionGroup が宣言されているかどうかを判断します。 これは、 クラスの概要で提供される大きな例の ConfigurationSectionGroup 一部です。

indent("Is Group Declared?: " + sectionGroup.IsDeclared);
indent("Is Group Declared?: " + _
    sectionGroup.IsDeclared.ToString())

注釈

セクション グループが構成ファイルで宣言されている場合、 プロパティは を IsDeclared 返します true

プロパティは IsDeclaredfalse このセクションが Machine.config または親構成ファイルから継承された場合に を返します。

適用対象

こちらもご覧ください