SPRoleCollection.Item property (Int32)
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 ( _
index As Integer _
) As SPRole
Get
'用途
Dim instance As SPRoleCollection
Dim index As Integer
Dim value As SPRole
value = instance(index)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRole this[
int index
] { get; }
參數
index
Type: System.Int32指定的索引為 32 位元整數。
Property value
Type: Microsoft.SharePoint.SPRole
SPRole 物件,表示該角色。
備註
如果指定的索引超出索引集合的有效範圍內的 [ Item ] 屬性,則會擲回ArgumentOutOfRangeException 。