GroupCollection.Add 方法
Adds a group to the collection of groups in a site collection.
命名空间: 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 Add ( _
parameters As GroupCreationInformation _
) As Group
用法
Dim instance As GroupCollection
Dim parameters As GroupCreationInformation
Dim returnValue As Group
returnValue = instance.Add(parameters)
public Group Add(
GroupCreationInformation parameters
)
参数
parameters
类型:Microsoft.SharePoint.Client.GroupCreationInformationA GroupCreationInformation object that represents information associated with the group.
It facilitates creation of a cross-site group
It must not be null.
返回值
类型:Microsoft.SharePoint.Client.Group
A Group object that represents the newly-added group.
异常
异常 | 条件 |
---|---|
SPException | The group description exceeds the maximum length. Error code: -2146232832. The group collection type is not a site-level group collection. Error code: -2146232832. The group owner is a role. Error code: -2146232832. The group owner is a domain group. Error code: -2146232832. The group collection is read-only. Error code: -2146232832. The group owner is 空引用(无 在 Visual Basic 中). Error code: -2130575293. The group name is empty or exceeds the maximum length. Error code: -2130575281. The default user is a non 空引用(无 在 Visual Basic 中) domain group. Error code: -2130575274. The group quota has exceeded. Error code: -2130575260. Another group with the same name is being added. Error code: -2130575169. |
ArgumentException | The group owner is 空引用(无 在 Visual Basic 中). Error code: -2147024809. |
ArgumentNullException | The group to be added is 空引用(无 在 Visual Basic 中). Error code: -2147467261. |
UnauthorizedAccessException | The group description exceeds the maximum length. Error code: -2147024891. |