public DirectorySearcher(DirectoryEntry searchRoot, string filter, string[] propertiesToLoad, System.DirectoryServices.SearchScope scope) { this.filter = "(objectClass=*)"; this.scope = System.DirectoryServices.SearchScope.Subtree; this.serverTimeLimit = minusOneSecond; this.clientTimeout = minusOneSecond; this.serverPageTimeLimit = minusOneSecond; this.referralChasing = ReferralChasingOption.External; this.sort = new SortOption(); this.cacheResults = true; this.attributeScopeQuery = ""; this.extendedDN = System.DirectoryServices.ExtendedDN.None; this.searchRoot = searchRoot; this.filter = filter; if (propertiesToLoad != null) { this.PropertiesToLoad.AddRange(propertiesToLoad); } this.SearchScope = scope; }