RepositoryCreateGroup Method (Group)
|
Create a new group in the repository.
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.1.261.8274
Syntaxpublic Group CreateGroup(
Group group
)
Public Function CreateGroup (
group As Group
) As Group
public:
Group^ CreateGroup(
Group^ group
)
member CreateGroup :
group : Group -> Group
Parameters
- group
- Type: Perforce.P4Group
Group specification for the new group
Return Value
Type:
GroupThe 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