SetFromList Method
Collapse the table of content
Expand the table of content

ConfigurationLockCollection.SetFromList Method (String)


Locks a set of configuration objects based on the supplied list.

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

public void SetFromList(
	string attributeList


Type: System.String

A comma-delimited string.

Exception Condition

Occurs when an item in the attributeList parameter is not a valid lockable configuration attribute.

The following code example demonstrates how to use the SetFromList method. This code example is part of a larger example provided for the ConfigurationLockCollection class.

// Create an ArrayList to contain
// the property items of the configuration
// section.
ArrayList configPropertyAL = new ArrayList(lockedAttribList.Count);
foreach (PropertyInformation propertyItem in
// Copy the elements of the ArrayList to a string array.
String[] myArr = (String[])configPropertyAL.ToArray(typeof(string));
// Create as a comma delimited list.
string propList = string.Join(",", myArr);
// Lock the items in the list.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft