SqlDataReader.GetFieldType(Int32) 方法

定義

取得 Type,即是物件的資料型別。Gets the Type that is the data type of the object.

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

參數

i
Int32

以零為基底的資料行序數。The zero-based column ordinal.

傳回

Type,此為物件的資料類型。The Type that is the data type of the object. 如果型別不存在於用戶端上,則在從資料庫傳回使用者定義型別 (UDT) 的案例中,GetFieldType 會傳回 null。If the type does not exist on the client, in the case of a User-Defined Type (UDT) returned from the database, GetFieldType returns null.

實作

適用於

另請參閱