Table of Contents

Class RowCollection

Namespace
Ranorex.Core.Data
Assembly
Ranorex.Core.dll

Represents a collection of Row instances.

public sealed class RowCollection : IList<Row>, ICollection<Row>, IEnumerable<Row>, IEnumerable
Inheritance
RowCollection
Implements
Inherited Members
Extension Methods

Constructors

RowCollection(ColumnCollection)

Initializes a new instance of the RowCollection class.

public RowCollection(ColumnCollection columns)

Parameters

columns ColumnCollection

The column collection this collection is bound to.

Properties

Columns

Gets the column collection this collection is bound to.

public ColumnCollection Columns { get; }

Property Value

ColumnCollection

The ColumnCollection this collection is bound to or null if this collection is not bound to columns, yet.

Count

Gets the number of rows contained in the collection.

public int Count { get; }

Property Value

int

The number of rows contained in the collection.

IsReadOnly

Gets a value indicating whether the collection is read-only.

public bool IsReadOnly { get; }

Property Value

bool

true if the collection is read-only; otherwise, false.

this[int]

Gets or sets the Row at the specified index.

public Row this[int index] { get; set; }

Parameters

index int

Property Value

Row

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the collection.

ArgumentNullException

If value is null.

Methods

Add(Row)

Adds the specified row.

public void Add(Row row)

Parameters

row Row

The row to add.

Exceptions

ArgumentNullException

If row is null.

Add(object[])

Adds a new row containing the specified values.

public void Add(object[] values)

Parameters

values object[]

The values for the new row to add.

Add(string[])

Adds a new row containing the specified values.

public void Add(string[] values)

Parameters

values string[]

The values for the new row to add.

Clear()

Removes all rows from the collection.

public void Clear()

Exceptions

NotSupportedException

The collection is read-only.

Contains(Row)

Determines whether the collection contains the specified row.

public bool Contains(Row item)

Parameters

item Row

The row to locate in the collection.

Returns

bool

true if item is found in the collection; otherwise, false.

CopyTo(Row[], int)

Copies the rows of the collection to an Array, starting at a particular Array index.

public void CopyTo(Row[] array, int arrayIndex)

Parameters

array Row[]

The one-dimensional Array that is the destination of the elements copied from the collection. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException
<code class="paramref">array</code> is multidimensional.

-or- arrayIndex is equal to or greater than the length of array. -or- The number of elements in the source collection is greater than the available space from arrayIndex to the end of the destination array.

CreateCopy(ColumnCollection)

Creates a deep copy of this collection.

public RowCollection CreateCopy(ColumnCollection columns)

Parameters

columns ColumnCollection

The column collection the copied collection is bound to.

Returns

RowCollection

A new row collection bound to columns and containing rows with the same values as the rows in this collection.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<Row> GetEnumerator()

Returns

IEnumerator<Row>

An enumerator that can be used to iterate through the collection.

IndexOf(Row)

Determines the index of a specific item in the collection.

public int IndexOf(Row item)

Parameters

item Row

The row to locate in the collection.

Returns

int

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

Insert(int, Row)

Inserts the row at the specified index.

public void Insert(int index, Row row)

Parameters

index int

The index to insert the row at.

row Row

The row to insert.

Exceptions

ArgumentNullException

If row is null.

ArgumentOutOfRangeException

index is not a valid index in the collection.

Remove(Row)

Removes the specified row.

public bool Remove(Row row)

Parameters

row Row

The row to remove.

Returns

bool

true if the row was successfully removed from the collection; otherwise, false. This method also returns false if the row is not found in the original collection.

RemoveAt(int)

Removes the row at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the row to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the collection.

NotSupportedException

The collection is read-only.