Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DirectorySearcher.Sort Property

Gets or sets a value indicating the property on which the results are sorted.

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

public SortOption Sort { get; set; }
/** @property */
public SortOption get_Sort ()

/** @property */
public void set_Sort (SortOption value)

public function get Sort () : SortOption

public function set Sort (value : SortOption)

Not applicable.

Property Value

A SortOption object that specifies the property and direction that the search results should be sorted on.

Exception typeCondition


The property value is a null reference (Nothing in Visual Basic) (Nothing in Visual Basic).

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

© 2015 Microsoft