ServiceModelConfigurationElementCollection<ConfigurationElementType>.IndexOf Method (ConfigurationElementType)

 

Returns the zero-based index of the first occurrence of a configuration element in this collection.

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

public int IndexOf(
	ConfigurationElementType element
)

Parameters

element
Type: ConfigurationElementType

The configuration element to locate in the collection.

Return Value

Type: System.Int32

The index of element if found in the collection; -1 otherwise.

Exception Condition
ArgumentNullException

element is null.

.NET Framework
Available since 3.0
Return to top
Show: