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

適用於