DirectorySearcher.Tombstone Property

Gets or sets a value indicating whether the search should also return deleted objects that match the search filter.

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

public bool Tombstone { get; set; }
/** @property */
public boolean get_Tombstone ()

/** @property */
public void set_Tombstone (boolean value)

public function get Tombstone () : boolean

public function set Tombstone (value : boolean)

Not applicable.

Property Value

true if deleted objects should be included in the search; false otherwise. The default value is false.

The following C# example shows how to set the Tombstone property to true.

using System.DirectoryServices;
// Create a DirectorySearcher object.
DirectorySearcher src = new DirectorySearcher("(isDeleted=true)");
//Set the Tombstone property to true.
src.Tombstone = true;
//Use the FindAll method to get search results.
SearchResultCollection res = src.FindAll();

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

Community Additions