ConfigurationSectionGroupCollectionとは? わかりやすく解説

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

ConfigurationSectionGroupCollection クラス

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

ConfigurationSectionGroup オブジェクトコレクション表します

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

<SerializableAttribute> _
Public NotInheritable Class
 ConfigurationSectionGroupCollection
    Inherits NameObjectCollectionBase
Dim instance As ConfigurationSectionGroupCollection
[SerializableAttribute] 
public sealed class ConfigurationSectionGroupCollection
 : NameObjectCollectionBase
[SerializableAttribute] 
public ref class ConfigurationSectionGroupCollection
 sealed : public NameObjectCollectionBase
/** @attribute SerializableAttribute() */ 
public final class ConfigurationSectionGroupCollection
 extends NameObjectCollectionBase
SerializableAttribute 
public final class ConfigurationSectionGroupCollection
 extends NameObjectCollectionBase
解説解説

ConfigurationSectionGroup オブジェクトコレクション反復処理するには、ConfigurationSectionGroupCollection使用します。このオブジェクトコレクションアクセスするには、SectionGroups プロパティまたは SectionGroups プロパティ使用します

ConfigurationSectionGroupCollection は、ConfigurationSectionGroup クラス拡張するカスタム型の作成にも使用されます。

使用例使用例

ConfigurationSectionGroupCollection使用方法次のコード例示します

Imports System
Imports System.Configuration
Imports System.Collections


' Define a custom section.
NotInheritable Public Class
 CustomSection
   Inherits ConfigurationSection
   
   
   Public Sub New()
   End Sub 'New
   
    <ConfigurationProperty("fileName", _
    DefaultValue:="default.txt", _
    IsRequired:=True, _
    IsKey:=False), _
    StringValidator( _
    InvalidCharacters:=" ~!@#$%^&*()[]{}/;'""|\",
 _
    MinLength:=1, _
    MaxLength:=60)> _
    Public Property FileName() As
 String
        Get
            Return CStr(Me("fileName"))
        End Get
        Set(ByVal value As
 String)
            Me("fileName") = value
        End Set
    End Property

    <ConfigurationProperty("maxUsers", _
    DefaultValue:=10000, _
    IsRequired:=False), _
    LongValidator(MinValue:=1, _
    MaxValue:=10000000, _
    ExcludeRange:=False)> _
   Public Property MaxUsers() As
 Long
        Get
            Return Fix(Me("maxUsers"))
        End Get
        Set(ByVal value As
 Long)
            Me("maxUsers") = value
        End Set
    End Property

    <ConfigurationProperty("maxIdleTime", _
    DefaultValue:="0:10:0", _
    IsRequired:=False), _
    TimeSpanValidator(MinValueString:="0:0:30", _
    MaxValueString:="5:00:0", _
    ExcludeRange:=False)> _
    Public Property MaxIdleTime() As
 TimeSpan
        Get
            Return CType(Me("maxIdleTime"),
 TimeSpan)
        End Get
        Set(ByVal value As
 TimeSpan)
            Me("maxIdleTime") =
 value
        End Set
    End Property

End Class 'CustomSection 

' Define a custom section group.

NotInheritable Public Class
 CustomSectionGroup
   Inherits ConfigurationSectionGroup
   
   
   Public Sub New()
   End Sub 'New

   
   Public ReadOnly Property
 Custom() As CustomSection
      Get
            Return CType(Sections.Get("CustomSection"),
 _
            CustomSection)
      End Get
    End Property

End Class 'CustomSectionGroup
 


Class UsingCustomSectionGroupCollection

   
   ' Create a custom section group.
   Shared Sub CreateSectionGroup()
      Try
         
         Dim customSectionGroup As CustomSectionGroup
         
         ' Get the current configuration file.
            Dim config As System.Configuration.Configuration
 = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)
         
         ' Create the section group entry  
         ' in the <configSections> and the 
         ' related target section in <configuration>.
         If config.SectionGroups("CustomGroup")
 Is Nothing Then
            customSectionGroup = New CustomSectionGroup()
            config.SectionGroups.Add("CustomGroup",
 customSectionGroup)
            customSectionGroup.ForceDeclaration(True)
            config.Save(ConfigurationSaveMode.Full)
         End If
      
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'CreateSectionGroup
    
   
   ' Get the collection group keys i.e.,
   ' the group names.
    'Shared Sub GetAllKeys()

    '   Try
    '         Dim config _
    '         As System.Configuration.Configuration = _
    '         ConfigurationManager.OpenExeConfiguration( _
    '         ConfigurationUserLevel.None)

    '         Dim groups _
    '         As ConfigurationSectionGroupCollection = _
    '         config.SectionGroups

    '      Dim name As String
    '      For Each name In  groups.AllKeys
    '         Console.WriteLine("Key value: {0}", name)
    '      Next name


    '   Catch err As ConfigurationErrorsException
    '      Console.WriteLine(err.ToString())
    '   End Try
    'End Sub 'GetAllKeys
   
   Shared Sub Clear()
      
      Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)


         config.SectionGroups.Clear()
         
         config.Save(ConfigurationSaveMode.Full)
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'Clear
   

   Shared Sub GetGroup()
      
      Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

            Dim customGroup _
            As ConfigurationSectionGroup = _
            groups.Get("CustomGroup")
         
         
         If customGroup Is Nothing
 Then
                Console.WriteLine( _
                "Failed to load CustomGroup.")
         Else
            ' Display section information
                Console.WriteLine("Name:       {0}",
 _
                customGroup.Name)
                Console.WriteLine("Type:   {0}", _
                customGroup.Type)
         End If
      
      
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'GetGroup
   

   Shared Sub GetEnumerator()
      
      Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

            Dim groupEnum As IEnumerator =
 _
            groups.GetEnumerator()
         
         Dim i As Integer
 = 0
         While groupEnum.MoveNext()
            Dim groupName As String
 = groups.GetKey(i)
            Console.WriteLine("Group name: {0}", groupName)
            i += 1
         End While

      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'GetEnumerator
   
   
   ' Get the collection keys i.e., the
   ' group names.
   Shared Sub GetKeys()
      
      Try
            Dim config _
          As System.Configuration.Configuration = _
          ConfigurationManager.OpenExeConfiguration( _
          ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

         Dim key As String
         For Each key In
  groups.Keys
            
            Console.WriteLine("Key value: {0}", key)
         Next key
      
      
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'GetKeys
      

   Shared Sub GetItems()
      
      Try
            Dim config _
        As System.Configuration.Configuration = _
        ConfigurationManager.OpenExeConfiguration( _
        ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

            Dim group1 As ConfigurationSectionGroup
 = _
            groups.Get("system.net")
         
            Dim group2 As ConfigurationSectionGroup
 = _
            groups.Get("system.web")
         
         
         Console.WriteLine("Group1: {0}", group1.Name)
         
         Console.WriteLine("Group2: {0}", group2.Name)
      
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'GetItems


   Shared Sub Remove()
      
      Try
         
            Dim config _
        As System.Configuration.Configuration = _
        ConfigurationManager.OpenExeConfiguration( _
        ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

            Dim customGroup _
            As ConfigurationSectionGroup = groups.Get("CustomGroup")
         
         If Not (customGroup Is
 Nothing) Then
            config.SectionGroups.Remove("CustomGroup")
            config.Save(ConfigurationSaveMode.Full)
         Else
                Console.WriteLine( _
                "CustomGroup does not exists.")
         End If
      
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'Remove
   
   
   
   ' Add custom section to the group.
   Shared Sub AddSection()
      Try
         
         Dim customSection As CustomSection
         
         ' Get the current configuration file.
            Dim config _
     As System.Configuration.Configuration = _
     ConfigurationManager.OpenExeConfiguration( _
     ConfigurationUserLevel.None)

            Dim groups _
            As ConfigurationSectionGroupCollection = _
            config.SectionGroups

         ' Create the section entry  
         ' in the <configSections> and the 
         ' related target section in <configuration>.
         Dim customGroup As ConfigurationSectionGroup
            customGroup = groups.Get("CustomGroup")
         
            If customGroup.Sections.Get( _
            "CustomSection") Is
 Nothing Then
                customSection = New CustomSection()
                customGroup.Sections.Add( _
                "CustomSection", customSection)
                customSection.SectionInformation.ForceSave = True
                config.Save(ConfigurationSaveMode.Full)
            End If
      Catch err As ConfigurationErrorsException
         Console.WriteLine(err.ToString())
      End Try
   End Sub 'AddSection
   
   
   ' Exercise the collection.
   ' Uncomment the function you want to exercise.
    ' Start with CreateSectionGroup().
    Public Overloads Shared
 Sub Main(ByVal args() As
 String)
        CreateSectionGroup()
        AddSection()
        ' GetEnumerator();
        ' GetKeys();
        ' GetItems();
        ' Remove();
        ' Clear();

    End Sub 'Main ' GetAllKeys();
End Class 'UsingCustomSectionGroupCollection
 ' GetGroup();

using System;
using System.Configuration;
using System.Collections;

namespace Samples.Config
{


    // Define a custom section.
    public sealed class CustomSection :
        ConfigurationSection
    {

        public CustomSection()
        { }

        [ConfigurationProperty("fileName", DefaultValue = "default.txt"
,
            IsRequired = true, IsKey = false)]
        [StringValidator(InvalidCharacters = " ~!@#$%^&*()[]{}/;'\"|\\"
,
            MinLength = 1, MaxLength = 60)]
        public string FileName
        {
            get
            {
                return (string)this["fileName"];
            }
            set
            {
                this["fileName"] = value;
            }
        }
      
        [ConfigurationProperty("maxUsers", DefaultValue = (long)10000,
            IsRequired = false)]
        [LongValidator(MinValue = 1, MaxValue = 10000000,
            ExcludeRange = false)]
        public long MaxUsers
        {
            get
            {
                return (long)this["maxUsers"];
            }
            set
            {
                this["maxUsers"] = value;
            }
        }
       
        [ConfigurationProperty("maxIdleTime",
            DefaultValue = "0:10:0",
            IsRequired = false)]
        [TimeSpanValidator(MinValueString = "0:0:30",
            MaxValueString = "5:00:0",
            ExcludeRange = false)]
        public TimeSpan MaxIdleTime
        {
            get
            {
                return (TimeSpan)this["maxIdleTime"];
            }
            set
            {
                this["maxIdleTime"] = value;
            }
        }
       
    }

    // Define a custom section group.
    public sealed class CustomSectionGroup
 :
        ConfigurationSectionGroup
    {

        public CustomSectionGroup()
        {
            
        }

        public CustomSection Custom
        {
            get { return (CustomSection) 
                Sections.Get("CustomSection");}
        }

    }

    class UsingCustomSectionGroupCollection
    {

      
        // Create a custom section group.
        static void CreateSectionGroup()
        {
            try
            {

                CustomSectionGroup customSectionGroup;
     
                // Get the current configuration file.
                System.Configuration.Configuration config =
                        ConfigurationManager.OpenExeConfiguration(
                        ConfigurationUserLevel.None);

                // Create the section group entry  
                // in the <configSections> and the 
                // related target section in <configuration>.
                if (config.SectionGroups["CustomGroup"]
 == null)
                {
                    customSectionGroup = new CustomSectionGroup();
                    config.SectionGroups.Add("CustomGroup", 
                        customSectionGroup);
                    customSectionGroup.ForceDeclaration(true);
                    config.Save(ConfigurationSaveMode.Full);
                }

            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }

        }

        // Get the collection group keys i.e.,
        // the group names.
        //static void GetAllKeys()
        //{

        //    try
        //    {
        //        System.Configuration.Configuration config =
        //        ConfigurationManager.OpenExeConfiguration(
        //        ConfigurationUserLevel.None);

        //        ConfigurationSectionGroupCollection groups =
        //            config.SectionGroups;
        //        groups.
        //        foreach (string name in groups.AllKeys)
        //        {
        //            Console.WriteLine(
        //             "Key value: {0}", name);
        //        }


        //    }
        //    catch (ConfigurationErrorsException err)
        //    {
        //        Console.WriteLine(err.ToString());
        //    }
        //}

        static void Clear()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                config.SectionGroups.Clear();

                config.Save(ConfigurationSaveMode.Full);
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void GetGroup()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionGroup customGroup =
                    config.SectionGroups.Get("CustomGroup");


                if (customGroup == null)
                    Console.WriteLine(
                        "Failed to load CustomSection.");
                else
                {
                    // Display section information
                    Console.WriteLine("Section group name:       {0}",
                        customGroup.SectionGroupName);
                    Console.WriteLine("Name:       {0}",
                        customGroup.Name);
                    Console.WriteLine("Type:   {0}",
                        customGroup.Type);

                }

            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void GetEnumerator()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionGroupCollection groups =
                    config.SectionGroups;

                IEnumerator groupEnum =
                    groups.GetEnumerator();

                int i = 0;
                while (groupEnum.MoveNext())
                {
                    string groupName = groups.GetKey(i);
                    Console.WriteLine(
                        "Group name: {0}", groupName);
                    i += 1;
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        // Get the collection keys i.e., the
        // group names.
        static void GetKeys()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionGroupCollection groups =
                    config.SectionGroups;

                foreach (string key in
 groups.Keys)
                {

                    Console.WriteLine(
                     "Key value: {0}", key);
                }


            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void GetItems()
        {

            try
            {
                System.Configuration.Configuration config =
                 ConfigurationManager.OpenExeConfiguration(
                 ConfigurationUserLevel.None);

                ConfigurationSectionGroupCollection groups =
                    config.SectionGroups;

                ConfigurationSectionGroup group1 =
                    groups.Get("system.net");

                ConfigurationSectionGroup group2 =
                groups.Get("system.web");


                Console.WriteLine(
                     "Group1: {0}", group1.Name);

                Console.WriteLine(
                    "Group2: {0}", group2.Name);

            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void Remove()
        {

            try
            {
 
                System.Configuration.Configuration config =
                    ConfigurationManager.OpenExeConfiguration(
                   ConfigurationUserLevel.None);

                ConfigurationSectionGroup customGroup =
                    config.SectionGroups.Get("CustomGroup");

                if (customGroup != null)
                {
                    config.SectionGroups.Remove("CustomGroup");
                    config.Save(ConfigurationSaveMode.Full);
                }
                else
                    Console.WriteLine(
                        "CustomGroup does not exists.");

            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }



        // Add custom section to the group.
        static void AddSection()
        {
            try
            {

                CustomSection customSection;

                // Get the current configuration file.
                System.Configuration.Configuration config =
                        ConfigurationManager.OpenExeConfiguration(
                        ConfigurationUserLevel.None);

                // Create the section entry  
                // in the <configSections> and the 
                // related target section in <configuration>.
                ConfigurationSectionGroup customGroup;
                customGroup = config.SectionGroups.Get("CustomGroup");

                if (customGroup.Sections.Get("CustomSection")
 == null)
                {
                    customSection = new CustomSection();
                    customGroup.Sections.Add("CustomSection",
                        customSection);
                    customSection.SectionInformation.ForceSave = true;
                    config.Save(ConfigurationSaveMode.Full);
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }

        }

        // Exercise the collection.
        // Uncomment the function you want to exercise.
        // Start with CreateSectionGroup().
        static void Main(string[]
 args)
        {
            CreateSectionGroup();
            AddSection();
            // GetAllKeys();
            // GetGroup();
            
            // GetEnumerator();
            
            // GetKeys();
            
            // GetItems();

            // Remove();
            // Clear();
        }


    }
}

例で使用した構成抜粋次に示します

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="CustomSection" 
      type="Samples.AspNet.Configuration.CustomSection, ConfigurationSectionCollection,
 Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere"
 allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />
  /configSections>

<CustomSection fileName="default.txt" maxUsers="1000" 
  maxIdleTime="00:05:00" />

</configuration>
継承階層継承階層
System.Object
   System.Collections.Specialized.NameObjectCollectionBase
    System.Configuration.ConfigurationSectionGroupCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConfigurationSectionGroupCollection メンバ
System.Configuration 名前空間
ConfigurationSectionGroup クラス
ConfigurationSectionCollection クラス
ConfigurationSection クラス
その他の技術情報
アプリケーション設定

ConfigurationSectionGroupCollection プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Count オーバーライドされますコレクション内のセクション グループの数を取得します
パブリック プロパティ Item オーバーロードされます。 この ConfigurationSectionGroupCollection に格納されている ConfigurationSectionGroup を取得または設定します
パブリック プロパティ Keys オーバーライドされます。 この ConfigurationSectionGroupCollection格納されているすべての ConfigurationSectionGroup オブジェクト対すキー取得します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ IsReadOnly  NameObjectCollectionBase インスタンス読み取り専用かどうかを示す値を取得または設定します。 ( NameObjectCollectionBase から継承されます。)
参照参照

関連項目

ConfigurationSectionGroupCollection クラス
System.Configuration 名前空間
ConfigurationSectionGroup クラス
ConfigurationSectionCollection クラス
ConfigurationSection クラス

その他の技術情報

アプリケーション設定

ConfigurationSectionGroupCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection に追加します
パブリック メソッド Clear コレクションを空にします。
パブリック メソッド CopyTo この ConfigurationSectionGroupCollection配列コピーします
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド Get オーバーロードされますコレクションから ConfigurationSectionGroup オブジェクト取得します
パブリック メソッド GetEnumerator オーバーライドされますConfigurationSectionGroupCollection オブジェクト反復処理できる列挙子を取得します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetKey この ConfigurationSectionGroupCollection格納されている、指定した ConfigurationSectionGroup オブジェクトキー取得します
パブリック メソッド GetObjectData オーバーライドされますシリアル化中にシステムにより使用されます。
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド OnDeserialization  ISerializable インターフェイス実装し、逆シリアル化完了したときに逆シリアル化イベント発生させます。 ( NameObjectCollectionBase から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Remove 名前を指定した ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection から削除します
パブリック メソッド RemoveAt インデックス指定した ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection から削除します
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド BaseAdd  指定したキーと値を持つエントリを NameObjectCollectionBase インスタンス追加します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseClear  NameObjectCollectionBase インスタンスかすべてのエントリを削除します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGet  オーバーロードされますNameObjectCollectionBase インスタンスから、指定したエントリの値を取得します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetAllKeys  NameObjectCollectionBase インスタンス内のすべてのキー格納する String 配列返します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetAllValues  オーバーロードされますNameObjectCollectionBase インスタンス内のすべての値を格納する配列返します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetKey  NameObjectCollectionBase インスタンス指定したインデックスにあるエントリのキー取得します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseHasKeys  NameObjectCollectionBase インスタンスが、キーnull 参照 (Visual Basic では Nothing) ではないエントリを格納しているかどうかを示す値を取得します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseRemove  指定したキーを持つエントリを NameObjectCollectionBase インスタンスか削除します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseRemoveAt  NameObjectCollectionBase インスタンス指定したインデックスにあるエントリを削除します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseSet  オーバーロードされますNameObjectCollectionBase インスタンス内のエントリの値を設定します。 ( NameObjectCollectionBase から継承されます。)
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 ( Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 ( Object から継承されます。)
参照参照

関連項目

ConfigurationSectionGroupCollection クラス
System.Configuration 名前空間
ConfigurationSectionGroup クラス
ConfigurationSectionCollection クラス
ConfigurationSection クラス

その他の技術情報

アプリケーション設定

ConfigurationSectionGroupCollection メンバ

ConfigurationSectionGroup オブジェクトコレクション表します

ConfigurationSectionGroupCollection データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Count オーバーライドされますコレクション内のセクション グループの数を取得します
パブリック プロパティ Item オーバーロードされます。 この ConfigurationSectionGroupCollection格納されている ConfigurationSectionGroup取得または設定します
パブリック プロパティ Keys オーバーライドされます。 この ConfigurationSectionGroupCollection格納されているすべての ConfigurationSectionGroup オブジェクト対すキー取得します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ IsReadOnly  NameObjectCollectionBase インスタンス読み取り専用かどうかを示す値を取得または設定します。(NameObjectCollectionBase から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection に追加します
パブリック メソッド Clear コレクションを空にします。
パブリック メソッド CopyTo この ConfigurationSectionGroupCollection配列コピーします
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド Get オーバーロードされますコレクションから ConfigurationSectionGroup オブジェクト取得します
パブリック メソッド GetEnumerator オーバーライドされますConfigurationSectionGroupCollection オブジェクト反復処理できる列挙子を取得します
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetKey この ConfigurationSectionGroupCollection格納されている、指定した ConfigurationSectionGroup オブジェクトキー取得します
パブリック メソッド GetObjectData オーバーライドされますシリアル化中にシステムにより使用されます。
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド OnDeserialization  ISerializable インターフェイス実装し、逆シリアル化完了したときに逆シリアル化イベント発生させます。 (NameObjectCollectionBase から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Remove 名前を指定した ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection から削除します
パブリック メソッド RemoveAt インデックス指定した ConfigurationSectionGroup オブジェクトを、この ConfigurationSectionGroupCollection から削除します
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド BaseAdd  指定したキーと値を持つエントリを NameObjectCollectionBase インスタンス追加します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseClear  NameObjectCollectionBase インスタンスかすべてのエントリを削除します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGet  オーバーロードされますNameObjectCollectionBase インスタンスから、指定したエントリの値を取得します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetAllKeys  NameObjectCollectionBase インスタンス内のすべてのキー格納する String 配列返します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetAllValues  オーバーロードされますNameObjectCollectionBase インスタンス内のすべての値を格納する配列返します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseGetKey  NameObjectCollectionBase インスタンス指定したインデックスにあるエントリのキー取得します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseHasKeys  NameObjectCollectionBase インスタンスが、キーnull 参照 (Visual Basic では Nothing) ではないエントリを格納しているかどうかを示す値を取得します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseRemove  指定したキーを持つエントリを NameObjectCollectionBase インスタンスか削除します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseRemoveAt  NameObjectCollectionBase インスタンス指定したインデックスにあるエントリを削除します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド BaseSet  オーバーロードされますNameObjectCollectionBase インスタンス内のエントリの値を設定します。 (NameObjectCollectionBase から継承されます。)
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 (Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 (Object から継承されます。)
参照参照

関連項目

ConfigurationSectionGroupCollection クラス
System.Configuration 名前空間
ConfigurationSectionGroup クラス
ConfigurationSectionCollection クラス
ConfigurationSection クラス

その他の技術情報

アプリケーション設定



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

辞書ショートカット

すべての辞書の索引

「ConfigurationSectionGroupCollection」の関連用語

ConfigurationSectionGroupCollectionのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS