Evidence.Clear 方法

定义

从证据集中移除主机和程序集证据。

public:
 void Clear();
public void Clear ();
[System.Runtime.InteropServices.ComVisible(false)]
public void Clear ();
member this.Clear : unit -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Clear : unit -> unit
Public Sub Clear ()
属性

示例

下面的代码示例演示如何使用 Clear 方法。 此示例是为 类提供的更大示例的 Evidence 一部分。

Console::WriteLine( "\nClear the current evidence." );
myEvidence->Clear();
Console::WriteLine( "Count is now {0}", myEvidence->Count );
Console.WriteLine("\nClear the current evidence.");
myEvidence.Clear();
Console.WriteLine("Count is now " + myEvidence.Count.ToString());
Console.WriteLine(ControlChars.Lf & "Clear the current evidence.")
myEvidence.Clear()
Console.WriteLine(("Count is now " & myEvidence.Count.ToString()))

注解

Clear 删除主机和程序集枚举中的证据,同时将 两者都设置为 null

适用于