DirectorySearch.PageSize = 2 doesn't work
- by Bero
using (DirectorySearcher srch = new DirectorySearcher(String.Format("(memberOf= {0})",p_Target.DistinguishedName)))
{
srch.PageSize = 2;
SearchResultCollection results = results = srch.FindAll();
int count = results.Count;
}
count = 3 (THREE) and not 2. Why is that? I don't want to have all results in just one page. I know that PageSize = 2 is silly small but I set that value in this case just for testing purpose (in reality it will be more).