SqlDataReader.GetSqlInt16(Int32) 方法

定義

取得指定的資料行值做為 SqlInt16Gets the value of the specified column as a SqlInt16.

public:
 System::Data::SqlTypes::SqlInt16 GetSqlInt16(int i);
public System.Data.SqlTypes.SqlInt16 GetSqlInt16 (int i);
member this.GetSqlInt16 : int -> System.Data.SqlTypes.SqlInt16
Public Function GetSqlInt16 (i As Integer) As SqlInt16

參數

i
Int32

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

傳回

表示為 SqlInt16 的資料行值。The value of the column expressed as a SqlInt16.

備註

不會執行任何轉換;因此,抓取的資料必須已經是16位帶正負號的整數,否則就會產生例外狀況。No conversions are performed; therefore, the data retrieved must already be a 16-bit signed integer, or an exception is generated.

適用於

另請參閱