Share via


DatabaseRoleCollection.Item Property (String)

Gets a DatabaseRole object in the collection by name.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    name As String _
) As DatabaseRole
    Get
'Usage
Dim instance As DatabaseRoleCollection
Dim name As String
Dim value As DatabaseRole

value = instance(name)
public DatabaseRole this[
    string name
] { get; }
public:
property DatabaseRole^ default[String^ name] {
    DatabaseRole^ get (String^ name);
}
member Item : DatabaseRole
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

Property Value

Type: Microsoft.SqlServer.Management.Smo.DatabaseRole
A DatabaseRole object value that represents the database role.