Export (0) Print
Expand All

DirectorySearcher.FindOne Method

Executes the search and returns only the first entry found.

[Visual Basic]
Public Function FindOne() As SearchResult
[C#]
public SearchResult FindOne();
[C++]
public: SearchResult* FindOne();
[JScript]
public function FindOne() : SearchResult;

Return Value

A SearchResult that is the first entry found during the search.

Remarks

If more than one entry is found during the search, only the first entry is returned. If no entries are found to match the search criteria, a null reference (Nothing in Visual Basic) is returned.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

DirectorySearcher Class | DirectorySearcher Members | System.DirectoryServices Namespace | SearchResult

Show:
© 2014 Microsoft