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.