DbDataReader.GetString(Int32) 方法

定义

在派生类中重写时,以 String 实例的形式获取指定列的值。When overridden in a derived class, gets the value of the specified column as an instance of String.

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

参数

ordinal
Int32

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

返回

String

指定列的值。The value of the specified column.

实现

例外

列索引超出范围。The column index is out of range.

指定的强制转换无效。The specified cast is not valid.

适用于

另请参阅