IDataReader.FieldCount プロパティ

定義

データ リーダー内のフィールドの数を取得します。

public:
 property int FieldCount { int get(); };
public int FieldCount { get; }
member this.FieldCount : int
Public ReadOnly Property FieldCount As Integer

プロパティ値

有効なレコードセットに配置されない場合は 0 になり、それ以外の場合は現在のレコードの列の数になります。 既定値は -1 です。

注釈

行を返さないクエリを実行すると、FieldCount は -1 を返します。

適用対象