Evidence.Clear Evidence.Clear Evidence.Clear Evidence.Clear Method

定义

从证据集中移除主机和程序集证据。Removes the host and assembly evidence from the evidence set.

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

示例

下面的代码示例演示如何使用 Clear 方法。The following code example shows the use of the Clear method. 此示例是为 Evidence 类提供的更大示例的一部分。This example is part of a larger example provided for the Evidence class.

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 会删除主机和程序集枚举中的证据,同时将两者都设置为 @no__t。Clear removes the evidence in the host and assembly enumerations, setting both to null.

安全性

SecurityPermission
用于控制证据。for the ability to control evidence. 安全操作: DemandSecurity action: Demand. 关联的枚举: ControlEvidenceAssociated enumeration: ControlEvidence

适用于