Class
XmlSelectorCollection

A collection that stores XmlElementSelector objects.

Definition

Constructors

XmlSelectorCollection()

Initializes a new instance of XmlSelectorCollection.

Declaration

cs-api-definition
public XmlSelectorCollection()

XmlSelectorCollection(XmlElementSelector[])

Initializes a new instance of XmlSelectorCollection containing any array of XmlElementSelector objects.

Declaration

cs-api-definition
public XmlSelectorCollection(XmlElementSelector[] value)

Parameters

value

XmlElementSelector[]

A array of XmlElementSelector objects with which to intialize the collection

XmlSelectorCollection(XmlSelectorCollection)

Initializes a new instance of XmlSelectorCollection based on another XmlSelectorCollection.

Declaration

cs-api-definition
public XmlSelectorCollection(XmlSelectorCollection value)

Parameters

value

XmlSelectorCollection

A XmlSelectorCollection from which the contents are copied

XmlSelectorCollection(int)

Initializes a new instance of XmlSelectorCollection.

Declaration

cs-api-definition
public XmlSelectorCollection(int capacity)

Parameters

capacity

int

Properties

this[int]

Represents the entry at the specified index of the XmlElementSelector.

Declaration

cs-api-definition
public XmlElementSelector this[int index] { get; set; }

Parameters

index

int

The zero-based index of the entry to locate in the collection.

Property Value

XmlElementSelector

The entry at the specified index of the collection.

Exceptions

ArgumentOutOfRangeException

index is outside the valid range of indexes for the collection.

Methods

Add(XmlElementSelector)

Adds a XmlElementSelector with the specified value to the XmlSelectorCollection .

Declaration

cs-api-definition
public int Add(XmlElementSelector value)

Parameters

value

XmlElementSelector

The XmlElementSelector to add.

Returns

int

The index at which the new element was inserted.

AddRange(XmlElementSelector[])

Copies the elements of an array to the end of the XmlSelectorCollection.

Declaration

cs-api-definition
public void AddRange(XmlElementSelector[] value)

Parameters

value

XmlElementSelector[]

An array of type XmlElementSelector containing the objects to add to the collection.

AddRange(XmlSelectorCollection)

Adds the contents of another XmlSelectorCollection to the end of the collection.

Declaration

cs-api-definition
public void AddRange(XmlSelectorCollection value)

Parameters

value

XmlSelectorCollection

A XmlSelectorCollection containing the objects to add to the collection.

Contains(XmlElementSelector)

Gets a value indicating whether the XmlSelectorCollection contains the specified XmlElementSelector.

Declaration

cs-api-definition
public bool Contains(XmlElementSelector value)

Parameters

value

XmlElementSelector

The XmlElementSelector to locate.

Returns

bool

true if the XmlElementSelector is contained in the collection; otherwise, false.

CopyTo(XmlElementSelector[], int)

Copies the XmlSelectorCollection values to a one-dimensional Array instance at the specified index.

Declaration

cs-api-definition
public void CopyTo(XmlElementSelector[] array, int index)

Parameters

array

XmlElementSelector[]

The one-dimensional Array that is the destination of the values copied from XmlSelectorCollection .

index

int

The index in array where copying begins.

Exceptions

ArgumentException

array is multidimensional.

-or-

The number of elements in the XmlSelectorCollection is greater than the available space between index and the end of array.

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than array's lowbound.

GetEnumerator()

Returns an enumerator that can iterate through the XmlSelectorCollection .

Declaration

cs-api-definition
public XmlSelectorCollection.XmlSelectorEnumerator GetEnumerator()

Returns

XmlSelectorCollection.XmlSelectorEnumerator

None.

IndexOf(XmlElementSelector)

Returns the index of a XmlElementSelector in the XmlSelectorCollection .

Declaration

cs-api-definition
public int IndexOf(XmlElementSelector value)

Parameters

value

XmlElementSelector

The XmlElementSelector to locate.

Returns

int

The index of the XmlElementSelector of value in the XmlSelectorCollection, if found; otherwise, -1.

Insert(int, XmlElementSelector)

Inserts a XmlElementSelector into the XmlSelectorCollection at the specified index.

Declaration

cs-api-definition
public void Insert(int index, XmlElementSelector value)

Parameters

index

int

The zero-based index where value should be inserted.

value

XmlElementSelector

The XmlElementSelector to insert.

Remove(XmlElementSelector)

Removes a specific XmlElementSelector from the XmlSelectorCollection .

Declaration

cs-api-definition
public void Remove(XmlElementSelector value)

Parameters

value

XmlElementSelector

The XmlElementSelector to remove from the XmlSelectorCollection .

Exceptions

ArgumentException

value is not found in the Collection.