/
SearchResultCollection.xml
577 lines (539 loc) · 36.6 KB
/
SearchResultCollection.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
<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
Inherits MarshalByRefObject
Implements ICollection, IDisposable" />
<TypeSignature Language="C++ CLI" Value="public ref class SearchResultCollection : MarshalByRefObject, IDisposable, System::Collections::ICollection" />
<TypeSignature Language="F#" Value="type SearchResultCollection = class
 inherit MarshalByRefObject
 interface ICollection
 interface IEnumerable
 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:
 bool Contains(System::DirectoryServices::SearchResult ^ result);" />
<MemberSignature Language="F#" Value="member this.Contains : System.DirectoryServices.SearchResult -> 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:
 void CopyTo(cli::array <System::DirectoryServices::SearchResult ^> ^ results, int index);" />
<MemberSignature Language="F#" Value="member this.CopyTo : System.DirectoryServices.SearchResult[] * int -> 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:
 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:
 virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -> unit
override this.Dispose : unit -> 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:
 virtual void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -> unit
override this.Dispose : bool -> 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 -> 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:
 virtual System::Collections::IEnumerator ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -> System.Collections.IEnumerator
override this.GetEnumerator : unit -> 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:
 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:
 int IndexOf(System::DirectoryServices::SearchResult ^ result);" />
<MemberSignature Language="F#" Value="member this.IndexOf : System.DirectoryServices.SearchResult -> 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:
 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:
 property cli::array <System::String ^> ^ PropertiesLoaded { cli::array <System::String ^> ^ 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>