IDataRecord.GetFieldType(Int32) 方法

定义

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

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

要查找的字段的索引。

返回

Type从中返回ObjectGetValue(Int32)数据类型对应的信息。

例外

传递的索引超出了 0 到 FieldCount0 的范围。

注解

此信息可用于通过指示要调用的强类型访问器来提高性能。 (例如,使用 GetInt32 速度比使用 GetValue快 10 倍。

适用于