DbConnection.ServerVersion 属性   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,获取表示对象所连接到的服务器的版本的字符串。
public:
 abstract property System::String ^ ServerVersion { System::String ^ get(); };public abstract string ServerVersion { get; }[System.ComponentModel.Browsable(false)]
public abstract string ServerVersion { get; }member this.ServerVersion : string[<System.ComponentModel.Browsable(false)>]
member this.ServerVersion : stringPublic MustOverride ReadOnly Property ServerVersion As String属性值
数据库的版本。 返回的字符串的格式取决于您正在使用的连接的特定类型。
- 属性
例外
当返回的任务未完成,且在调用 OpenAsync 后未打开连接时,调用了 ServerVersion。