语言

IDataReader.GetFieldType(Int32) 方法

定义

获取与返回对象GetValue(Int32)类型对应的类型信息。

public:
 Type ^ GetFieldType(int fieldIndex);
public Type GetFieldType(int fieldIndex);
abstract member GetFieldType : int -> Type
Public Function GetFieldType (fieldIndex As Integer) As Type

参数

fieldIndex
Int32

要查找的字段的索引。

返回

对应对象类型的信息,将返回从GetValue(Int32)。

注解

异常

例外类型 条件
Index超出范围异常 传递的索引超出了 0 到 FieldCount0 的范围。

适用于