By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Check Whether SharePoint Group Exists

P: n/a
I was wondering if there was any way to programmatically determine
whether or not a group exists in SharePoint. I checked the
SPGroupCollection in the SPWeb.SiteGroups property and didn't see any
methods for doing lookups. I could obviously write my own code that
loops through each group, but I was wondering if there was an
easier/cleaner way to accomplish this task.

Thank you in advance,

--
Sean
Sep 26 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sep 26, 9:53 pm, "Fao, Sean" <enceladus...@yahoo.comI-WANT-NO-SPAM>
wrote:
I was wondering if there was any way to programmatically determine
whether or not a group exists in SharePoint. I checked the
SPGroupCollection in the SPWeb.SiteGroups property and didn't see any
methods for doing lookups. I could obviously write my own code that
loops through each group, but I was wondering if there was an
easier/cleaner way to accomplish this task.

Thank you in advance,

--
Sean
what about loop?

foreach(SPGroup spGroup in spWeb.SiteGroups)
{
....
}

Sep 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.