TermStore.CreateGroup method (String)

Creates a new Group object in this TermStore.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public Function CreateGroup ( _
    name As String _
) As Group
'Usage
Dim instance As TermStore
Dim name As String
Dim returnValue As Group

returnValue = instance.CreateGroup(name)
public Group CreateGroup(
    string name
)

Parameters

  • name
    Type: System.String

    The name of the new Group being created

Return value

Type: Microsoft.SharePoint.Taxonomy.Group
The newly created Group

Exceptions

Exception Condition
UnauthorizedAccessException

The current user has insufficient permissions to perform this operation.

ArgumentException

The name parameter is invalid. It either contains invalid characters, or is too long.

ArgumentException

Group names must be unique.

ArgumentNullException

The name cannot be a null reference (Nothing in Visual Basic) or empty.

Remarks

The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters: ;"<>|**[&]**tab

Additionally the name must be a unique Group name within the current TermStore.The current user must have TaxonomyRights.ManageTermStore permission in order to use this method. Call the CommitAll() method to save this change to the database.

See also

Reference

TermStore class

TermStore members

CreateGroup overload

Microsoft.SharePoint.Taxonomy namespace

Name