Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
577 lines (539 sloc) 36.6 KB
<Type Name="SearchResultCollection" FullName="System.DirectoryServices.SearchResultCollection">
<TypeSignature Language="C#" Value="public class SearchResultCollection : MarshalByRefObject, IDisposable, System.Collections.ICollection" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit SearchResultCollection extends System.MarshalByRefObject implements class System.Collections.ICollection, class System.Collections.IEnumerable, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:System.DirectoryServices.SearchResultCollection" />
<TypeSignature Language="VB.NET" Value="Public Class SearchResultCollection&#xA;Inherits MarshalByRefObject&#xA;Implements ICollection, IDisposable" />
<TypeSignature Language="C++ CLI" Value="public ref class SearchResultCollection : MarshalByRefObject, IDisposable, System::Collections::ICollection" />
<TypeSignature Language="F#" Value="type SearchResultCollection = class&#xA; inherit MarshalByRefObject&#xA; interface ICollection&#xA; interface IEnumerable&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.MarshalByRefObject</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>The <see cref="T:System.DirectoryServices.SearchResultCollection" /> class contains the <see cref="T:System.DirectoryServices.SearchResult" /> instances that the Active Directory hierarchy returned during a <see cref="T:System.DirectoryServices.DirectorySearcher" /> query.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Due to implementation restrictions, the <xref:System.DirectoryServices.SearchResultCollection> class cannot release all of its unmanaged resources when it is garbage collected. To prevent a memory leak, you must call the <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method when the <xref:System.DirectoryServices.SearchResultCollection> object is no longer needed.
]]></format>
</remarks>
<permission cref="T:System.DirectoryServices.DirectoryServicesPermission">
<see cref="F:System.Security.Permissions.SecurityAction.LinkDemand" />
</permission>
</Docs>
<Members>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public bool Contains (System.DirectoryServices.SearchResult result);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance bool Contains(class System.DirectoryServices.SearchResult result) cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.Contains(System.DirectoryServices.SearchResult)" />
<MemberSignature Language="VB.NET" Value="Public Function Contains (result As SearchResult) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; bool Contains(System::DirectoryServices::SearchResult ^ result);" />
<MemberSignature Language="F#" Value="member this.Contains : System.DirectoryServices.SearchResult -&gt; bool" Usage="searchResultCollection.Contains result" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="result" Type="System.DirectoryServices.SearchResult" />
</Parameters>
<Docs>
<param name="result">The <see cref="T:System.DirectoryServices.SearchResult" /> object to find.</param>
<summary>Determines if a specified <see cref="T:System.DirectoryServices.SearchResult" /> object is in this collection.</summary>
<returns>
<see langword="true" /> if the specified property belongs to this collection; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public void CopyTo (System.DirectoryServices.SearchResult[] results, int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void CopyTo(class System.DirectoryServices.SearchResult[] results, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.CopyTo(System.DirectoryServices.SearchResult[],System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub CopyTo (results As SearchResult(), index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CopyTo(cli::array &lt;System::DirectoryServices::SearchResult ^&gt; ^ results, int index);" />
<MemberSignature Language="F#" Value="member this.CopyTo : System.DirectoryServices.SearchResult[] * int -&gt; unit" Usage="searchResultCollection.CopyTo (results, index)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="results" Type="System.DirectoryServices.SearchResult[]" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="results">The array of <see cref="T:System.DirectoryServices.SearchResult" /> objects that receives the elements of this collection.</param>
<param name="index">The zero-based index in <paramref name="results" /> where this method starts copying this collection.</param>
<summary>Copies all <see cref="T:System.DirectoryServices.SearchResult" /> objects in this collection to the specific array, starting at the specified index in the target array.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.Count" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Count As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Count { int get(); };" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.DirectoryServices.SearchResultCollection.Count" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of <see cref="T:System.DirectoryServices.SearchResult" /> objects in this collection.</summary>
<value>The number of <see cref="T:System.DirectoryServices.SearchResult" /> objects in this collection.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Dispose">
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Releases all resources that are used by the <see cref="T:System.DirectoryServices.SearchResultCollection" /> object.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="searchResultCollection.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all resources that are used by the <see cref="T:System.DirectoryServices.SearchResultCollection" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method, it allows the resources that are used by the <xref:System.DirectoryServices.SearchResultCollection> to be reallocated for other purposes. For more information about <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A>, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md).
The garbage collector does not release memory for a <xref:System.DirectoryServices.SearchResultCollection> object. Therefore, an application must call the <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method explicitly to prevent a memory leak.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -&gt; unit&#xA;override this.Dispose : bool -&gt; unit" Usage="searchResultCollection.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources that are used by the <see cref="T:System.DirectoryServices.SearchResultCollection" /> object and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method and the <xref:System.Object.Finalize%2A> method. <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> invokes the protected <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method with the `disposing` parameter set to `true`. <xref:System.Object.Finalize%2A> invokes <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> with the `disposing` parameter set to `false`.
When the `disposing` parameter is `true`, this method releases all resources that are held by any managed objects that this <xref:System.DirectoryServices.SearchResultCollection> references.
The garbage collector does not release memory for a <xref:System.DirectoryServices.SearchResultCollection> object. Therefore, you must call the <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method explicitly to prevent a memory leak.
This method invokes the <xref:System.DirectoryServices.SearchResultCollection.Dispose%2A> method of each object in the collection.
For more information about <xref:System.DirectoryServices.SearchResultCollection.Dispose> and <xref:System.Object.Finalize%2A>, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.DirectoryServices.SearchResultCollection.Dispose" /> method can be called multiple times by other objects. When overriding the <see cref="M:System.DirectoryServices.SearchResultCollection.Dispose(System.Boolean)" /> method be careful not to reference objects that have been previously disposed of in an earlier call to the <see cref="M:System.DirectoryServices.SearchResultCollection.Dispose" /> method. For more information about how to implement <see cref="M:System.DirectoryServices.SearchResultCollection.Dispose" />, see [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).</para>
</block>
</Docs>
</Member>
<Member MemberName="Finalize">
<MemberSignature Language="C#" Value="~SearchResultCollection ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Finalize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.Finalize" />
<MemberSignature Language="VB.NET" Value="Finalize ()" />
<MemberSignature Language="C++ CLI" Value="!SearchResultCollection ()" />
<MemberSignature Language="F#" Value="override this.Finalize : unit -&gt; unit" Usage="searchResultCollection.Finalize " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Overrides the <see cref="M:System.Object.Finalize" /> method.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.IEnumerator GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Public Function GetEnumerator () As IEnumerator" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Collections::IEnumerator ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -&gt; System.Collections.IEnumerator&#xA;override this.GetEnumerator : unit -&gt; System.Collections.IEnumerator" Usage="searchResultCollection.GetEnumerator " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns an enumerator that you can use to iterate through this collection.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> object that you can use to iterate through this collection.</returns>
<remarks>To be added.</remarks>
<altmember cref="T:System.Collections.IEnumerator" />
</Docs>
</Member>
<Member MemberName="Handle">
<MemberSignature Language="C#" Value="public IntPtr Handle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int Handle" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.Handle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Handle As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr Handle { IntPtr get(); };" />
<MemberSignature Language="F#" Value="member this.Handle : nativeint" Usage="System.DirectoryServices.SearchResultCollection.Handle" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the handle that is returned by the <c>IDirectorySearch::ExecuteSearch</c> method that performs the actual search. For more information, see the <see href="/windows/desktop/api/iads/nf-iads-idirectorysearch-executesearch">IDirectorySearch::ExecuteSearch</see> article.</summary>
<value>The ADS_SEARCH_HANDLE value that this collection uses.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.DirectoryServices.DirectorySearcher> that created this collection calls the `IDirectorySearch::ExecuteSearch` method, which makes the query results available to the <xref:System.DirectoryServices.SearchResultCollection> object. For more information, see the [IDirectorySearch::ExecuteSearch](/windows/desktop/api/iads/nf-iads-idirectorysearch-executesearch) article.
Each time that a query is performed, a handle for the results of that query is associated with its <xref:System.DirectoryServices.SearchResultCollection> object. This handle corresponds to the search handle in ADSI. This handle persists until you call the <xref:System.DirectoryServices.SearchResultCollection.Dispose> method on the <xref:System.DirectoryServices.SearchResultCollection> object, so you must call <xref:System.DirectoryServices.SearchResultCollection.Dispose> to prevent a memory leak. The garbage collector does not free memory for this particular object.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="C#" Value="public int IndexOf (System.DirectoryServices.SearchResult result);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 IndexOf(class System.DirectoryServices.SearchResult result) cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.IndexOf(System.DirectoryServices.SearchResult)" />
<MemberSignature Language="VB.NET" Value="Public Function IndexOf (result As SearchResult) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int IndexOf(System::DirectoryServices::SearchResult ^ result);" />
<MemberSignature Language="F#" Value="member this.IndexOf : System.DirectoryServices.SearchResult -&gt; int" Usage="searchResultCollection.IndexOf result" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="result" Type="System.DirectoryServices.SearchResult" />
</Parameters>
<Docs>
<param name="result">The <see cref="T:System.DirectoryServices.SearchResult" /> object to search for in this collection.</param>
<summary>Returns the index of the first occurrence of the specified <see cref="T:System.DirectoryServices.SearchResult" /> object in this collection.</summary>
<returns>The zero-based index of the first matching object. Returns -1 if no member of this collection is identical to the <see cref="T:System.DirectoryServices.SearchResult" /> object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public System.DirectoryServices.SearchResult this[int index] { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.DirectoryServices.SearchResult Item(int32)" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.Item(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Default Public ReadOnly Property Item(index As Integer) As SearchResult" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::DirectoryServices::SearchResult ^ default[int] { System::DirectoryServices::SearchResult ^ get(int index); };" />
<MemberSignature Language="F#" Value="member this.Item(int) : System.DirectoryServices.SearchResult" Usage="System.DirectoryServices.SearchResultCollection.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DirectoryServices.SearchResult</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="index">The zero-based index of the <see cref="T:System.DirectoryServices.SearchResult" /> object to retrieve.</param>
<summary>Gets the <see cref="T:System.DirectoryServices.SearchResult" /> object that is located at a specified index in this collection.</summary>
<value>The <see cref="T:System.DirectoryServices.SearchResult" /> object that is located at the specified index.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
In C#, this property is the indexer for the <xref:System.DirectoryServices.SearchResultCollection> class.
In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and with an index type of <xref:System.String>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PropertiesLoaded">
<MemberSignature Language="C#" Value="public string[] PropertiesLoaded { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string[] PropertiesLoaded" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.PropertiesLoaded" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PropertiesLoaded As String()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;System::String ^&gt; ^ PropertiesLoaded { cli::array &lt;System::String ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.PropertiesLoaded : string[]" Usage="System.DirectoryServices.SearchResultCollection.PropertiesLoaded" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.DirectoryServices.DirectorySearcher" /> properties that were specified before the search was executed.</summary>
<value>An array of type <see cref="T:System.String" /> that contains the properties that were specified in the <see cref="P:System.DirectoryServices.DirectorySearcher.PropertiesToLoad" /> property collection before the search was executed.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.CopyTo">
<MemberSignature Language="C#" Value="void ICollection.CopyTo (Array array, int index);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.ICollection.CopyTo(class System.Array array, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.DirectoryServices.SearchResultCollection.System#Collections#ICollection#CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
<param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
<summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> is less than zero.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="array" /> is multidimensional.
-or-
The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
<exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
<MemberSignature Language="C#" Value="bool System.Collections.ICollection.IsSynchronized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.ICollection.IsSynchronized" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.System#Collections#ICollection#IsSynchronized" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsSynchronized As Boolean Implements ICollection.IsSynchronized" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::ICollection::IsSynchronized { bool get(); };" />
<MemberSignature Language="F#" Usage="System.Collections.ICollection.IsSynchronized" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.IsSynchronized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
<value>
<see langword="true" /> if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Collections.ICollection.SyncRoot%2A> returns an object, which can be used to synchronize access to the <xref:System.Collections.ICollection>.
Most collection classes in the <xref:System.Collections?displayProperty=nameWithType> namespace also implement a Synchronized method, which provides a synchronized wrapper around the underlying collection.
Enumerating through a collection is intrinsically not a thread safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
[Visual Basic, C#]
The following code example shows how to lock the collection using the <xref:System.Collections.ICollection.SyncRoot%2A> during the entire enumeration:
```csharp
ICollection myCollection = new ICollection();
lock(myCollection.SyncRoot) {
foreach (Object item in myCollection) {
// Insert your code here.
}
}
```
```vb
Dim myCollection As New ICollection()
Dim item As Object
SyncLock myCollection.SyncRoot
For Each item In myCollection
' Insert your code here.
Next item
End SyncLock
```
]]></format>
</remarks>
<altmember cref="P:System.Collections.ICollection.SyncRoot" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
<MemberSignature Language="C#" Value="object System.Collections.ICollection.SyncRoot { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.ICollection.SyncRoot" />
<MemberSignature Language="DocId" Value="P:System.DirectoryServices.SearchResultCollection.System#Collections#ICollection#SyncRoot" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property SyncRoot As Object Implements ICollection.SyncRoot" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::ICollection::SyncRoot { System::Object ^ get(); };" />
<MemberSignature Language="F#" Usage="System.Collections.ICollection.SyncRoot" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.SyncRoot</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
<value>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For collections whose underlying store is not publicly available, the expected implementation is to return the current instance. Note that the pointer to the current instance might not be sufficient for collections that wrap other collections; those should return the underlying collection's `SyncRoot` property.
Most collection classes in the <xref:System.Collections?displayProperty=nameWithType> namespace also implement a `Synchronized` method, which provides a synchronized wrapper around the underlying collection. However, derived classes can provide their own synchronized version of the collection using the <xref:System.Collections.ICollection.SyncRoot%2A> property. The synchronizing code must perform operations on the <xref:System.Collections.ICollection.SyncRoot%2A> of the collection, not directly on the collection. This ensures proper operation of collections that are derived from other objects. Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the collection instance.
In the absence of a `Synchronized` method on a collection, the expected usage for <xref:System.Collections.ICollection.SyncRoot%2A> looks like this:
```csharp
ICollection MyCollection =...
lock(MyCollection.SyncRoot) {
// Some operation on the collection, which is now thread safe.
}
```
```vb
Dim myCollection as New ICollection()
SyncLock myCollection.SyncRoot
' Some operation on the collection, which is now thread safe.
End SyncLock
```
Enumerating through a collection is intrinsically not a thread safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
[Visual Basic, C#]
The following code example shows how to lock the collection using the <xref:System.Collections.ICollection.SyncRoot%2A> during the entire enumeration:
```csharp
ICollection myCollection = new ICollection();
lock(myCollection.SyncRoot) {
foreach (Object item in myCollection) {
// Insert your code here.
}
}
```
```vb
Dim myCollection As New ICollection()
Dim item As Object
SyncLock myCollection.SyncRoot
For Each item In myCollection
' Insert your code here.
Next item
End SyncLock
```
]]></format>
</remarks>
<altmember cref="P:System.Collections.ICollection.IsSynchronized" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.