ConfigurationPropertyCollection Class

 

Represents a collection of configuration-element properties.

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

System::Object
  System.Configuration::ConfigurationPropertyCollection

public ref class ConfigurationPropertyCollection : ICollection, 
	IEnumerable

NameDescription
System_CAPS_pubmethodConfigurationPropertyCollection()

Initializes a new instance of the ConfigurationPropertyCollection class.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of properties in the collection.

System_CAPS_pubpropertyIsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread safe).

System_CAPS_pubpropertyItem[String^]

Gets the collection item with the specified name.

System_CAPS_pubpropertySyncRoot

Gets the object to synchronize access to the collection.

NameDescription
System_CAPS_pubmethodAdd(ConfigurationProperty^)

Adds a configuration property to the collection.

System_CAPS_pubmethodClear()

Removes all configuration property objects from the collection.

System_CAPS_pubmethodContains(String^)

Specifies whether the configuration property is contained in this collection.

System_CAPS_pubmethodCopyTo(array<ConfigurationProperty^>^, Int32)

Copies this ConfigurationPropertyCollection to an array.

System_CAPS_pubmethodEquals(Object^)

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

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Gets the IEnumerator object as it applies to the collection.

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetType()

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(String^)

Removes a configuration property from the collection.

System_CAPS_pubmethodToString()

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

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection::CopyTo(Array^, Int32)

Copies this collection to an array.

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.)

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.

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>

.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: