ConfigurationSectionGroupCollection Class

 

Represents a collection of ConfigurationSectionGroup objects.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

System.Object
  System.Collections.Specialized.NameObjectCollectionBase
    System.Configuration.ConfigurationSectionGroupCollection

[<Sealed>]
[<SerializableAttribute>]
type ConfigurationSectionGroupCollection = 
    class
        inherit NameObjectCollectionBase
    end

NameDescription
System_CAPS_pubpropertyCount

Gets the number of section groups in the collection.(Overrides NameObjectCollectionBase.Count.)

System_CAPS_pubpropertyItem(Int32)

Gets the ConfigurationSectionGroup object whose index is specified from the collection.

System_CAPS_pubpropertyItem(String)

Gets the ConfigurationSectionGroup object whose name is specified from the collection.

System_CAPS_pubpropertyKeys

Gets the keys to all ConfigurationSectionGroup objects contained in this ConfigurationSectionGroupCollection object.(Overrides NameObjectCollectionBase.Keys.)

NameDescription
System_CAPS_pubmethodAdd(String, ConfigurationSectionGroup)

Adds a ConfigurationSectionGroup object to this ConfigurationSectionGroupCollection object.

System_CAPS_pubmethodClear()

Clears the collection.

System_CAPS_pubmethodCopyTo(ConfigurationSectionGroup[], Int32)

Copies this ConfigurationSectionGroupCollection object to an array.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGet(Int32)

Gets the specified ConfigurationSectionGroup object contained in the collection.

System_CAPS_pubmethodGet(String)

Gets the specified ConfigurationSectionGroup object from the collection.

System_CAPS_pubmethodGetEnumerator()

Gets an enumerator that can iterate through the ConfigurationSectionGroupCollection object.(Overrides NameObjectCollectionBase.GetEnumerator().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetKey(Int32)

Gets the key of the specified ConfigurationSectionGroup object contained in this ConfigurationSectionGroupCollection object.

System_CAPS_pubmethodGetObjectData(SerializationInfo, StreamingContext)

Used by the system during serialization.(Overrides NameObjectCollectionBase.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodOnDeserialization(Object)

Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.(Inherited from NameObjectCollectionBase.)

System_CAPS_pubmethodRemove(String)

Removes the ConfigurationSectionGroup object whose name is specified from this ConfigurationSectionGroupCollection object.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the ConfigurationSectionGroup object whose index is specified from this ConfigurationSectionGroupCollection object.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

Copies the entire NameObjectCollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.(Inherited from NameObjectCollectionBase.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value indicating whether access to the NameObjectCollectionBase object is synchronized (thread safe).(Inherited from NameObjectCollectionBase.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the NameObjectCollectionBase object.(Inherited from NameObjectCollectionBase.)

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<'TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<'TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

Use the ConfigurationSectionGroupCollection class to iterate through a collection of ConfigurationSectionGroup objects. You can access this collection of objects using the SectionGroups property or the SectionGroups property.

The ConfigurationSectionGroupCollection class is also used in the creation of custom types that extend the ConfigurationSectionGroup class.

The following code example shows how to use the ConfigurationSectionGroupCollection class.

No code example is currently available or this language may not be supported.

The following example is an excerpt of the configuration file used by the previous example.

<?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>

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: