IDataRecord.GetFieldType(Int32) 方法

定义

获取对应于会从 GetValue(Int32) 返回的 Object 类型的 Type 信息。

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

参数

i
Int32

要查找的字段的索引。

返回

对应于会从 GetValue(Int32) 返回的 Object 类型的 Type 信息。

例外

传递的索引位于 0 至 FieldCount 的范围之外。

注解

此信息可用于通过指示要调用的强类型访问器来提高性能。 例如, (,使用 GetInt32 的速度大约是使用 GetValue.)

适用于