Mono Class Library: System.Collections.Specialized.NameValueCollection Overview | Members

System.Collections.Specialized.NameValueCollection.Item Property

Gets the value in the current instance that is associated with the specified index. [Edit]

This is the default property for this class.

public string this [int index] { get; }

Parameters

index
A int that specifies the zero-based index of the entry to locate in the current instance. [Edit]

Value

A string that contains the comma-separated list of values at the specified index of the current instance. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionindex is outside the valid range of indices for the current instance. [Edit]
NotSupportedExceptionThe property is being set and the current instance is read-only. [Edit]

Remarks

This property is read-only.

Note:

This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index].

This property cannot be set. To set the value at a specified index, use Item[GetKey(index)].

[Edit]

Requirements

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0