SPRoleCollection.Item 属性 (Int32)

请注意:此 API 现在已过时。

Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Changes in the Authorization Object Model. (In Windows SharePoint Services 2.0, the Item property returned the role object at the specified index in the collection and is maintained for backward compatibility.)

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
<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
    类型:System.Int32

    32 位整数,指定的索引。

属性值

类型:Microsoft.SharePoint.SPRole
一个表示该角色的SPRole对象。

备注

如果指定的 index 是索引集的有效范围之外, Item属性将引发ArgumentOutOfRangeException 。

另请参阅

引用

SPRoleCollection 类

SPRoleCollection 成员

Item 重载

Microsoft.SharePoint 命名空间