This documentation is archived and is not being maintained.

ConfigurationPropertyCollection Class

Represents a collection of configuration-element properties.

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

public class ConfigurationPropertyCollection : ICollection, IEnumerable
public class ConfigurationPropertyCollection implements ICollection, IEnumerable
public class ConfigurationPropertyCollection implements ICollection, IEnumerable
Not applicable.

The ConfigurationPropertyCollection class represents the collection of the ConfigurationProperty objects that can be attributes or ConfigurationElement objects of a configuration element.

The ConfigurationProperty class represents an individual configuration setting. It allows you to get or set the name, type, and default value for a particular configuration entity (attribute or element). Additional options allow you to specify whether the attribute is required, is an element key, or represents a default element collection.

The following example shows one possible use of the ConfigurationPropertyCollection. Refer to the example of the related type ConfigurationProperty.

// Return the initialized property bag
// for the configuration element.
// The collection (property bag) that contains 
// the properties is declared as:
// ConfigurationPropertyCollection _Properties;
protected override ConfigurationPropertyCollection Properties
        return _Properties;

The following is an excerpt from the configuration used by the above example.

<?xml version="1.0" encoding="utf-8"?>
    <section name="CustomSection" type="Samples.AspNet, ConfigurationProperty, Version=, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />
    <CustomSection fileName="default.txt" alias="alias.txt" maxUsers="1000"
      maxIdleTime="00:05:00" />


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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0