CommaDelimitedStringCollection.AddRange Method (String[])

 

Adds all the strings in a string array to the collection.

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

public void AddRange(
	string[] range
)

Parameters

range
Type: System.String[]

An array of strings to add to the collection.

The range parameter must be an array rather than a comma-delimited string.

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

// Add values to the CommaDelimitedStringCollection object.
myStrCollection.AddRange(
  authorizationRuleCollection.Get(i).Users.ToString().Split(
  ",".ToCharArray()));

.NET Framework
Available since 2.0
Return to top
Show: