TechNet
Export (0) Print
Expand All

SearchResultCollection Class

 

The SearchResultCollection class contains the SearchResult instances that the Active Directory hierarchy returned during a DirectorySearcher query.

Namespace:   System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

System.Object
  System.MarshalByRefObject
    System.DirectoryServices.SearchResultCollection

[DirectoryServicesPermissionAttribute(SecurityAction.LinkDemand, 
	Unrestricted = true)]
public class SearchResultCollection : MarshalByRefObject, ICollection, 
	IEnumerable, IDisposable

NameDescription
System_CAPS_pubpropertyCount

Gets the number of SearchResult objects in this collection.

System_CAPS_pubpropertyHandle

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.

System_CAPS_pubpropertyItem[Int32]

Gets the SearchResult object that is located at a specified index in this collection.

System_CAPS_pubpropertyPropertiesLoaded

Gets the DirectorySearcher properties that were specified before the search was executed.

NameDescription
System_CAPS_pubmethodContains(SearchResult)

Determines if a specified SearchResult object is in this collection.

System_CAPS_pubmethodCopyTo(SearchResult[], Int32)

Copies all SearchResult objects in this collection to the specific array, starting at the specified index in the target array.

System_CAPS_pubmethodCreateObjRef(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.)

System_CAPS_pubmethodDispose()

Releases all resources that are used by the SearchResultCollection object.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources that are used by the SearchResultCollection object and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Overrides the Object.Finalize method.(Overrides Object.Finalize().)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator that you can use to iterate through this collection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(SearchResult)

Returns the index of the first occurrence of the specified SearchResult object in this collection.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection.CopyTo(Array, Int32)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<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.

.NET Framework
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.

Return to top
Show:
© 2016 Microsoft