SearchResultCollection Class
The SearchResultCollection class contains the SearchResult instances that the Active Directory hierarchy returned during a DirectorySearcher query.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of SearchResult objects in this collection. |
![]() | Handle | Gets the handle that is returned by the IDirectorySearch::ExecuteSearch method that performs the actual search. For more information, see the IDirectorySearch::ExecuteSearch topic in the MSDN Library at http://msdn.microsoft.com/library. |
![]() | Item[Int32] | Gets the SearchResult object that is located at a specified index in this collection. |
![]() | PropertiesLoaded | Gets the DirectorySearcher properties that were specified before the search was executed. |
| Name | Description | |
|---|---|---|
![]() | Contains(SearchResult) | Determines if a specified SearchResult object is in this collection. |
![]() | CopyTo(SearchResult[], Int32) | Copies all SearchResult objects in this collection to the specific array, starting at the specified index in the target array. |
![]() | CreateObjRef(Type) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.) |
![]() | Dispose() | Releases all resources that are used by the SearchResultCollection object. |
![]() | Dispose(Boolean) | Releases the unmanaged resources that are used by the SearchResultCollection object and optionally releases the managed resources. |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Overrides the Object.Finalize method.(Overrides Object.Finalize().) |
![]() | GetEnumerator() | Returns an enumerator that you can use to iterate through this collection. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | GetType() | |
![]() | IndexOf(SearchResult) | Returns the index of the first occurrence of the specified SearchResult object in this collection. |
![]() | InitializeLifetimeService() | Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.) |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection.CopyTo(Array, Int32) | Copies the elements of the ICollection to an Array, starting at a particular Array index. |
![]() ![]() | ICollection.IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
![]() ![]() | ICollection.SyncRoot | Gets an object that can be used to synchronize access to the ICollection. |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<TResult>() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
Due to implementation restrictions, the SearchResultCollection class cannot release all of its unmanaged resources when it is garbage collected. To prevent a memory leak, you must call the Dispose method when the SearchResultCollection object is no longer needed.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





