SPRoleCollection.Item property (String)
NOTE: This API is now obsolete.
已過時。請改用新的SPRoleDefinition和SPRoleAssignment類別,來定義角色,並將使用者指派給它們。如需詳細資訊,請參閱Changes in the Authorization Object Model。(在Windows SharePoint Services 2.0, Item屬性從集合傳回具有指定名稱的角色物件和維護回溯相容性。)
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")> _
Public ReadOnly Default Property Item ( _
name As String _
) As SPRole
Get
'用途
Dim instance As SPRoleCollection
Dim name As String
Dim value As SPRole
value = instance(name)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRole this[
string name
] { get; }
參數
name
Type: System.String字串,包含名稱。
Property value
Type: Microsoft.SharePoint.SPRole
SPRole 物件,表示該角色。