//添加用户组
private static void DtToXml(SPWeb web, string guanliGroup)
{
if (web.SiteGroups.GetCollection(new String[] {name}).Count <= 0)
{
try
{
web.SiteGroups.Add(“组名称”, web.CurrentUser, null, "描述");
//取得当前添加的用户组
SPGroup group = web.SiteGroups["组名称"];
}
catch (Exception ex)
{
throw ex;
}
}
}