Moles + SPGroupcollection issue

121 Views Asked by At

I would like to mole spgroupcolelction and the related enumeration(foreach loop) Im unable to do so..can someone guide me here.. I've already seen post in stackoverflow for it...but the answer is very vague.. hence posting again

SPGroupCollection sharePointGroupCollection = contextWeb.Groups; 
foreach (SPGroup sharePointGroup in sharePointGroupCollection) 
{ 
    if (groupname == sharePointGroup.Name) 
    { 
         //My logic.
    } 
}
1

There are 1 best solutions below

0
On

This is a sample and you will see specific answer to this in the site.
[http://qwuizno.com/Pages/Applications/Operations/ForumControler.aspx].

        MGridViewRow gvRow = new MGridViewRow();

        MGridViewRowCollection rowCol = new MGridViewRowCollection()
        {
            GetEnumerator = () => {
                return new GridViewRow[] {
                    gvRow
                }.GetEnumerator();
            }
        };