语言

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。

适用于