我需要更改SharePoint 2010网站集中所有调查的某些权限,如何列出它们?
例如列出我可以做的文档库
SPSite oSiteCollection = SPContext.Current.Site;
SPWebCollection collWebsite = oSiteCollection.AllWebs;
foreach (SPWeb web in collWebsite)
{
SPListCollection collList = web.Lists;
foreach (SPList oList in collList)
{
if (oList is SPDocumentLibrary)
{
// Do something
}
}
}
提前致谢。
答案 0 :(得分:1)
使用if语句
if (oList.BaseType == SPBaseType.Survey)