ConfigurationPropertyCollection Class
Assembly: System.Configuration (in system.configuration.dll)
'Declaration Public Class ConfigurationPropertyCollection Implements ICollection, IEnumerable 'Usage Dim instance As ConfigurationPropertyCollection
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 Overrides ReadOnly Property Properties() _ As ConfigurationPropertyCollection Get Return _Properties End Get End Property
The following is an excerpt from the configuration used by the above example.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="CustomSection" type="Samples.AspNet, ConfigurationProperty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />
</configSections>
<CustomSection fileName="default.txt" alias="alias.txt" maxUsers="1000"
maxIdleTime="00:05:00" />
</configuration>
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.