Moles + SPGroupcollection问题

时间:2012-01-26 17:45:27

标签: moles

我想鼹鼠spgroupcolelction和相关的枚举(foreach循环) 我无法这样做..有人在这里指导我.. 我已经在stackoverflow中看到了它的帖子......但答案很模糊.. 因此再次发布

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

1 个答案:

答案 0 :(得分:1)

这是一个示例,您将在网站上看到具体的答案            的 [http://qwuizno.com/Pages/Applications/Operations/ForumControler.aspx]

        MGridViewRow gvRow = new MGridViewRow();

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