DirectorySearcher.Tombstone 屬性

定義

取得或設定值,指出搜尋是否還應傳回符合搜尋篩選條件的已刪除物件。

C#
public bool Tombstone { get; set; }
C#
[System.DirectoryServices.DSDescription("DSTombstone")]
[System.Runtime.InteropServices.ComVisible(false)]
public bool Tombstone { get; set; }

屬性值

如果搜尋中應包含已刪除物件則為 true,否則為 false。 預設值是 false

屬性

範例

下列 C# 範例示範如何將 屬性設定 Tombstonetrue

C#
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();  

適用於

產品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9