DatabaseReplicaStateCollection.Item 属性 (String, String)
Gets a DatabaseReplicaState object in the collection by name.
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
Public ReadOnly Default Property Item ( _
replicaName As String, _
name As String _
) As DatabaseReplicaState
Get
用法
Dim instance As DatabaseReplicaStateCollection
Dim replicaName As String
Dim name As String
Dim value As DatabaseReplicaState
value = instance(replicaName, name)
public DatabaseReplicaState this[
string replicaName,
string name
] { get; }
public:
property DatabaseReplicaState^ default[String^ replicaName, String^ name] {
DatabaseReplicaState^ get (String^ replicaName, String^ name);
}
member Item : DatabaseReplicaState
JScript 支持使用索引属性,但不支持声明新索引属性。
参数
- replicaName
类型:System.String
The name of the replica.
- name
类型:System.String
A value that specifies the name of the DatabaseReplicaState object in the DatabaseReplicaStateCollection collection.
属性值
类型:Microsoft.SqlServer.Management.Smo.DatabaseReplicaState
A DatabaseReplicaState object value that represents the database role.