Share via


ResultPropertyValueCollection

The ResultPropertyValueCollection class contains the values of a SearchResult property.

The ResultPropertyValueCollection class is derived from the System.Collections.ReadOnlyCollectionBase class.

Public Methods

The ResultPropertyValueCollection class has the following public methods.

Method Description
Contains(Object)

Determines whether a specified property value is in this collection.

CopyTo(Object[], Int32)

Copies the property values from this collection to an array, starting at a particular index of the array.

Equals(Object)

Determines whether the specified Object is equal to the current Object.

GetEnumerator()

Returns an enumerator that can iterate through the ReadOnlyCollectionBase instance.

GetHashCode()

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetType()

Gets the Type of the current instance.

IndexOf(Object)

Retrieves the index of a specified property value in this collection.

ToString()

Returns a String that represents the current Object.

Public Properties

The ResultPropertyValueCollection class has the following public properties.

Property Description
Count Data type: Int32
Access type: Read-only

Gets the number of elements contained in the ReadOnlyCollectionBase instance.

Item Data type: Object
Access type: Read-only

Gets the property value that is located at a specified index.

In C#, this property is the indexer for the ResultPropertyValueCollection class.

Protected Methods

The ResultPropertyValueCollection class has the following protected methods.

Method Description
Finalize()

Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

MemberwiseClone()

Creates a shallow copy of the current Object.

Protected Properties

The ResultPropertyValueCollection class has the following protected properties.

Property Description
InnerList Data type: ArrayList
Access type: Read-only

Gets the list of elements contained in the ReadOnlyCollectionBase instance.

Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code.

Remarks

SearchResult instances are similar to DirectoryEntry instances. The notable difference is that the DirectoryEntry retrieves its information from the Active Directory hierarchy each time a new object is accessed, whereas the data for the SearchResult is already available in the SearchResultCollection that a DirectorySearcher query returns. If you try to get a SearchResult property that your query did not specify for retrieval, the property will not be available.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Requirements

Client Requires Windows XP Home Edition, Windows XP Professional, Windows Me, or Windows 98.
Server Requires Windows Server 2003, Windows 2000, or Windows NT 4.0.
Namespace

Defined in System.DirectoryServices.

Assembly

Requires System.DirectoryServices (in System.DirectoryServices.dll).

.NET Framework

Requires .NET Framework 1.0.

See Also

System.DirectoryServices Namespace, Managed Extensions for C++ Programming