Table of Contents

Method GetNames

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

GetNames(IDataRecord)

Gets all the column names of the current result set in ordinal order.

public static ImmutableArray<string> GetNames(this IDataRecord record)

Parameters

record IDataRecord

The record to get the column names from.

Returns

ImmutableArray<string>

An immutable array of column names.

Exceptions

ArgumentNullException

record is null.

See Also

GetNames(IDataRecord, IEnumerable<int>)

Gets the column names at the specified ordinals.

public static ImmutableArray<string> GetNames(this IDataRecord record, IEnumerable<int> ordinals)

Parameters

record IDataRecord

The record to get the column names from.

ordinals IEnumerable<int>

The ordinals to look up. The names are returned in this order.

Returns

ImmutableArray<string>

An immutable array of column names, one for each ordinal.

Exceptions

ArgumentNullException

record is null.

IndexOutOfRangeException

An ordinal is not a valid column index for the record.