RoleDefinitionCollection.GetById 方法
返回集合中的角色定义具有指定 ID。
命名空间: Microsoft.SharePoint.Client
程序集: Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中); Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中) Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)
语法
声明
Public Function GetById ( _
id As Integer _
) As RoleDefinition
用法
Dim instance As RoleDefinitionCollection
Dim id As Integer
Dim returnValue As RoleDefinition
returnValue = instance.GetById(id)
public RoleDefinition GetById(
int id
)
参数
id
类型:System.Int32指定搜索角色定义的唯一标识符。Id 的值不是集中角色定义的索引对应,但引用 RoleDefinition 的Id属性的值。
返回值
类型:Microsoft.SharePoint.Client.RoleDefinition
表示角色定义的RoleDefinition对象。
异常
异常 | 条件 |
---|---|
ArgumentException | 在给定的范围集合中不存在的角色定义。错误代码 ︰-2147024809。 |