Share via


SPGroupCollection members

Represents a collection of SPGroup objects.

The SPGroupCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of groups in the collection. (Overrides SPBaseCollection.Count.)
Public property Item[Int32] Gets the group object at the specified index in the collection.
Public property Item[String] Gets the group object that has the specified name from the collection.
Public property RetrieveAllRoles Gets or sets a Boolean value that specifies whether to preload roles for users to increase performance. (Inherited from SPMemberCollection.)
Public property Web Gets the Web site to which the collection belongs. (Inherited from SPMemberCollection.)
Public property Xml Gets the properties of the collection as XML.

Top

Methods

  Name Description
Public method Add Adds a group to the collection of groups in a site collection.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetByID Returns a group from the collection based on the member ID of the group.
Public method GetByName Returns a cross-site group from the collection based on the name of the group.
Public method GetCollection([]) Returns a collection of groups from the collection based on the group IDs.
Public method GetCollection([]) Returns a collection of groups from the collection based on an array of names.
Public method GetEnumerator Gets an enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetTypedEnumerator<T> Returns a type-safe enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove(Int32) Removes the group at the specified index in the collection.
Public method Remove(String) Removes the group with the specified name from the collection.
Public method RemoveByID Removes the group with the specified member ID from the collection.
Public method ToString (Inherited from Object.)

Top

Fields

  Name Description
Protected field m_arrRolesData Store the role definition data as a two-dimensional array. (Inherited from SPMemberCollection.)
Protected field m_dwCountRoles Store the number of role definitions. (Inherited from SPMemberCollection.)
Protected field m_role Store the role definition to which the collection belongs. (Inherited from SPMemberCollection.)
Protected field m_web Store the Web site to which the collection belongs. (Inherited from SPMemberCollection.)

Top

Explicit interface implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the elements of the collection to an array, starting at the specified array index. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.IsSynchronized Gets a Boolean value that indicates whether access to the collection is synchronized or thread-safe. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.SyncRoot Gets an object that is used to synchronize access to the collection. (Inherited from SPBaseCollection.)

Top

See also

Reference

SPGroupCollection class

Microsoft.SharePoint namespace