This documentation is archived and is not being maintained.

Evidence.Clear Method

Removes the host and assembly evidence from the evidence set.

Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)] 
public void Clear ()
/** @attribute ComVisibleAttribute(false) */ 
public void Clear ()
ComVisibleAttribute(false) 
public function Clear ()
Not applicable.

Clear removes the evidence in the host and assembly enumerations, setting both to a null reference (Nothing in Visual Basic).

The following code example shows the use of the Clear method. 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 " + myEvidence.Count.ToString());

Console.WriteLine("\nClear the current evidence.");
myEvidence.Clear();
Console.WriteLine(("Count is now " + myEvidence.get_Count()));

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: