ConfigurationSection.GetRuntimeObject メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ConfigurationSection.GetRuntimeObject メソッドの意味・解説 

ConfigurationSection.GetRuntimeObject メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

派生クラスオーバーライドされると、カスタム オブジェクト返します

名前空間: System.Configuration
アセンブリ: System.Configuration (system.configuration.dll 内)
構文構文

解説解説

GetSection メソッド実行時呼び出されると、構成システム最初に ConfigurationSection クラス適切なインスタンス作成し次に GetRuntimeObject メソッドから取得したオブジェクト返します

既定では、GetRuntimeObject は、呼び出し元の ConfigurationSection を表すオブジェクト返すだけです。

実装時の注意 GetRuntimeObject メソッドオーバーライドして、実行時カスタム型を返すことができます。 たとえば、ConfigurationSection クラス設定実行時変更制限するには、GetRuntimeObjectオーバーライドして、変更できる設定がある場合にはその設定制限適用するカスタム型を返しますランタイム オブジェクト内部のみである場合返されるオブジェクトは、オブジェクト定義するアセンブリ外では使用できません。ConfigurationSection から派生した実行時アセンブリ内のコードによってのみアクセスできるオブジェクト作成する方法1 つは、ConfigurationSection 実装返すメソッドを含む内部ランタイム オブジェクト作成することです。

使用例使用例

ConfigurationSection を使用する方法の例を次に示します

' Customizes the use of CustomSection
 ' by setting _ReadOnly to false.
' Remember you must use it along with ThrowIfReadOnly.
Protected Overrides Function
 GetRuntimeObject() As Object
   ' To enable property setting just assign true to
   ' the following flag.
   _ReadOnly = True
   Return MyBase.GetRuntimeObject()
End Function 'GetRuntimeObject

// Customizes the use of CustomSection
// by setting _ReadOnly to false.
// Remember you must use it along with ThrowIfReadOnly.
protected override object GetRuntimeObject()
{
    // To enable property setting just assign true to
    // the following flag.
    _ReadOnly = true;
    return base.GetRuntimeObject();
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からConfigurationSection.GetRuntimeObject メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からConfigurationSection.GetRuntimeObject メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からConfigurationSection.GetRuntimeObject メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ConfigurationSection.GetRuntimeObject メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ConfigurationSection.GetRuntimeObject メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS