This topic has not yet been rated - Rate this topic

SPGroupCollection.GetByID Method

Returns a group from the collection based on the member ID of the group.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
[ClientCallableMethodAttribute(Name = "GetById", CacheReturnValue = true, ReturnObjectIdentity = true)]
[ClientCallableExceptionConstraintAttribute(FixedId = "System.UnauthorizedAccessException$-2147024891", 
	ErrorType = typeof(UnauthorizedAccessException), ErrorCode = , Condition = "Access is denied.")]
[ClientCallableExceptionConstraintAttribute(FixedId = "Microsoft.SharePoint.SPException$-2146232832", 
	ErrorType = typeof(SPException), ErrorCode = , Condition = "Group cannot be found.")]
[ClientCallableExceptionConstraintAttribute(FixedId = "1", ErrorType = typeof(ArgumentException), 
	Condition = "Unknown/incorrect group collection type to be initialized.", 
	ErrorCode = )]
public SPGroup GetByID(
	int id
)

Parameters

id
Type: System.Int32
A 32-bit integer that specifies the member ID.

Return Value

Type: Microsoft.SharePoint.SPGroup
An SPGroup object that represents the group.

The value of the id parameter corresponds to the unique member ID for the group, which is contained in the ID property of the SPMember class.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ