DbDataReader.GetOrdinal(String) 方法

定义

在派生类中重写时,在给定了列名称的情况下,获取列序号。When overridden in a derived class, gets the column ordinal given the name of the column.

public:
 abstract int GetOrdinal(System::String ^ name);
public abstract int GetOrdinal (string name);
abstract member GetOrdinal : string -> int
Public MustOverride Function GetOrdinal (name As String) As Integer

参数

name
String

列的名称。The name of the column.

返回

Int32

从零开始的列序号。The zero-based column ordinal.

实现

例外

指定的名称不是有效的列名。The name specified is not a valid column name.

适用于

另请参阅