IDataRecord.GetFieldType(Int32) 方法

定義

取得對應至 Object 類型的 Type 資訊,前者是從 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

要尋找的欄位索引。

傳回

對應至 Object 類型的 Type 資訊,前者是從 GetValue(Int32) 所傳回。

例外狀況

傳遞的索引超出 0 到 FieldCount 的範圍。

備註

這項資訊可用來指示要呼叫的強型別存取子來提升效能。 例如, (,使用 GetInt32 的速度大約比使用 GetValue.) 快 10 倍

適用於