ConfigurationUserLevel 列挙体とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ConfigurationUserLevel 列挙体の意味・解説 

ConfigurationUserLevel 列挙体

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

OpenExeConfiguration によって返され構成オブジェクト表される構成ファイル指定するために使用されます。

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

Public Enumeration ConfigurationUserLevel
Dim instance As ConfigurationUserLevel
public enum ConfigurationUserLevel
public enum class ConfigurationUserLevel
public enum ConfigurationUserLevel
public enum ConfigurationUserLevel
メンバメンバ
解説解説

ConfigurationUserLevel使用してConfigurationManager.OpenExeConfiguration および System.Configuration.ConfigurationManager.OpenExeConfiguration によって返され構成オブジェクト表される構成ファイル指定します

アプリケーション構成ファイルは、アプリケーションと同じディレクトリ内にあり、同じ名前が付けられていますが、拡張子.config です。たとえば、C:\System\Public.exe の構成ファイルは C:\System\Public.exe.config です。

アプリケーションでは、すべてのユーザー適用するグローバル構成個々ユーザー適用する個別構成、およびローミング ユーザー適用する構成使用します

使用例使用例

ConfigurationUserLevel 列挙体を使用する方法の例を次に示します。この例は、ConfigurationManagerトピック取り上げている例の一部分です。

 ' Modify a custom section. Show how to use the
 ' OpenExeConfiguration(ConfigurationUserLevel) method.
Shared Sub ModifyCustomSection()
   ' Get the application configuration file.
     Dim config As System.Configuration.Configuration
 = _
     ConfigurationManager.OpenExeConfiguration( _
     ConfigurationUserLevel.None)
   
   Console.WriteLine(config.FilePath)
   
     Dim custSection As CustomSection = _
     config.Sections(customSectionName)
   
   custSection.FileName = "newName.txt"
   custSection.MaxIdleTime = New TimeSpan(0, 15, 0)
   custSection.MaxUsers = custSection.MaxUsers + 10
   
   If Not custSection.ElementInformation.IsLocked
 Then
      config.Save()
   Else
      Console.WriteLine("Section was locked, could not update.")
   End If
End Sub 'ModifyCustomSection
// Modify a custom section. Show how to use the
// OpenExeConfiguration(ConfigurationUserLevel) method.
static void ModifyCustomSection()
{
    // Get the application configuration file.
    System.Configuration.Configuration config =
            ConfigurationManager.OpenExeConfiguration(
            ConfigurationUserLevel.None);

    Console.WriteLine(config.FilePath);

    CustomSection custSection =
       config.Sections[customSectionName] as CustomSection;

    custSection.FileName = "newName.txt";
    custSection.MaxIdleTime = new TimeSpan(0, 15, 0);
    custSection.MaxUsers = custSection.MaxUsers + 10;

    if (!custSection.ElementInformation.IsLocked)
        config.Save();
    else
        Console.WriteLine("Section was locked, could not update.");
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「ConfigurationUserLevel 列挙体」の関連用語

ConfigurationUserLevel 列挙体のお隣キーワード
検索ランキング

   

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



ConfigurationUserLevel 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS