Click or drag to resize

RepositoryCreateGroup Method (Group)

Create a new group in the repository.

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.258.5793
Syntax
public Group CreateGroup(
	Group group
)

Parameters

group
Type: Perforce.P4Group
Group specification for the new group

Return Value

Type: Group
The Group object if new group was created, null if creation failed
Examples
To create the group 'Mygroup' with the owner 'Bob' and a users 'Ted' and 'Alex':
string targetGroup = "Mygroup";
Group group = new Group();
group.Id = targetGroup;
group.UserNames = new  List<string> { "Ted", "Alex" };
group.OwnerNames = new  List<string> { "Bob" };
_repository.CreateGroup(group);
See Also