DirectorySearcher.Tombstone 属性

定义

获取或设置一个值,该值指示搜索是否还应返回与搜索筛选器匹配的已删除对象。

public:
 property bool Tombstone { bool get(); void set(bool value); };
public bool Tombstone { get; set; }
[System.DirectoryServices.DSDescription("DSTombstone")]
[System.Runtime.InteropServices.ComVisible(false)]
public bool Tombstone { get; set; }
member this.Tombstone : bool with get, set
[<System.DirectoryServices.DSDescription("DSTombstone")>]
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Tombstone : bool with get, set
Public Property Tombstone As Boolean

属性值

如果搜索中应包括已删除对象,则为 true;否则为 false。 默认值是 false

属性

示例

以下 C# 示例演示如何将 Tombstone 属性设置为 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();  

适用于