Propriété DatabaseReplicaStateCollection.Item (String, String)
Gets a DatabaseReplicaState object in the collection by name.
Espace de noms : Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Syntaxe
'Déclaration
Public ReadOnly Default Property Item ( _
replicaName As String, _
name As String _
) As DatabaseReplicaState
Get
'Utilisation
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 prend en charge l'utilisation de propriétés indexées, mais pas la déclaration de nouvelles propriétés.
Paramètres
- replicaName
Type : System.String
The name of the replica.
- name
Type : System.String
A value that specifies the name of the DatabaseReplicaState object in the DatabaseReplicaStateCollection collection.
Valeur de propriété
Type : Microsoft.SqlServer.Management.Smo.DatabaseReplicaState
A DatabaseReplicaState object value that represents the database role.