is DirectorySearcher.SizeLimit = 1 for FindAll() equal to FindOne() [DirectoryServices/.net]
- 阅读更多 关于 is DirectorySearcher.SizeLimit = 1 for FindAll() equal to FindOne() [DirectoryServices/.net]
问题 When using the DirectorySearcher in .net, are these two statements equal? Same for both: Dim ds As New DirectorySearcher ' code to setup the searcher First statement ds.FindOne() Second statement ds.SizeLimit = 1 ds.FindAll() ...except obviously that FindOne() returns a SearchResult object and FindAll() returns a SearchResultCollection object 回答1: Yes, that would be almost the same. Almost, because in .NET 2.0 (not sure if it's been fixed in more recent versions), the .FindOne() call had some