语言

SqlDataReader.HasRows 属性

定义

获取一个值,该值指示是否 SqlDataReader 包含一行或多行。

对于新开发,请使用Microsoft。Data.SqlClient。 此页面记录 System.Data.SqlClient。

public:
 virtual property bool HasRows { bool get(); };
public:
 property bool HasRows { bool get(); };
public override bool HasRows { get; }
public bool HasRows { get; }
member this.HasRows : bool
Public Overrides ReadOnly Property HasRows As Boolean
Public ReadOnly Property HasRows As Boolean

属性值

true SqlDataReader如果包含一行或多行,则为 ;否则为 false。

适用于

另请参阅