共用方式為


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

適用於