IDataRecord.GetFieldType(Int32) IDataRecord.GetFieldType(Int32) IDataRecord.GetFieldType(Int32) IDataRecord.GetFieldType(Int32) Method

定义

获取对应于会从 GetValue(Int32) 返回的 Object 类型的 Type 信息。Gets the Type information corresponding to the type of Object that would be returned from 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 Int32 Int32 Int32

要查找的字段的索引。The index of the field to find.

返回

对应于会从 GetValue(Int32) 返回的 Object 类型的 Type 信息。The Type information corresponding to the type of Object that would be returned from GetValue(Int32).

异常

传递的索引位于 0 至 FieldCount 的范围之外。The index passed was outside the range of 0 through FieldCount.

注解

此信息可用于通过指示要调用的强类型访问器来提高性能。This information can be used to increase performance by indicating the strongly-typed accessor to call. (例如, 使用GetInt32比使用GetValue大约10倍。)(for example, using GetInt32 is roughly ten times faster than using GetValue.)

适用于