DirectorySearch.PageSize = 2 doesn't work

前端 未结 2 1864
孤城傲影
孤城傲影 2021-01-19 05:31
     using (DirectorySearcher srch = new DirectorySearcher(String.Format(\"(memberOf=  {0})\",p_Target.DistinguishedName)))
     {
            srch.PageSize = 2;
            


        
2条回答
  •  温柔的废话
    2021-01-19 05:43

    Look at this code and related article by Ethan Wilansky,

    http://msdn.microsoft.com/en-us/magazine/dd250826.aspx?code=true&level=root&file=VLVSrch.cs

    Does exactly what you want.

提交回复
热议问题