ServerRoleCollection.Item Property (String)
Gets a ServerRole 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 ServerRole
Get
'Usage
Dim instance As ServerRoleCollection
Dim name As String
Dim value As ServerRole
value = instance(name)
public ServerRole this[
string name
] { get; }
public:
property ServerRole^ default[String^ name] {
ServerRole^ get (String^ name);
}
member Item : ServerRole
JScript supports the use of indexed properties, but not the declaration of new ones.
Parameters
- name
Type: System.String
A String value that specifies the name of the ServerRole object in the ServerRoleCollection collection.
Property Value
Type: Microsoft.SqlServer.Management.Smo.ServerRole
A ServerRole object value that represents the server role.
See Also