OleDbDataReader.GetTimeSpan(Int32) 方法

定義

取得指定之資料行的值做為 TimeSpan 物件。

public:
 TimeSpan GetTimeSpan(int ordinal);
public TimeSpan GetTimeSpan (int ordinal);
member this.GetTimeSpan : int -> TimeSpan
Public Function GetTimeSpan (ordinal As Integer) As TimeSpan

參數

ordinal
Int32

以零為基底的資料行序數。

傳回

指定的資料行值。

例外狀況

指定的轉型無效。

備註

不會執行轉換;因此,擷取的資料必須已經是 TimeSpan 物件。

呼叫 IsDBNull 以在呼叫這個方法之前尋找 Null 值。

適用於

另請參閱