Evidence Constructor (Evidence)

 

Initializes a new instance of the Evidence class from a shallow copy of an existing one.

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

public Evidence(
	Evidence evidence
)

Parameters

evidence
Type: System.Security.Policy.Evidence

The Evidence instance from which to create the new instance. This instance is not deep-copied.

Exception Condition
ArgumentException

The evidence parameter is not a valid instance of Evidence.

The following code example shows the use of the Evidence(Evidence) constructor. This example is part of a larger example provided for the Evidence class.

Console.WriteLine("\nMake a copy of the current evidence.");
Evidence evidenceCopy = new Evidence(myEvidence);
Console.WriteLine("Count of new evidence items = " + evidenceCopy.Count);
Console.WriteLine("Does the copy equal the current evidence? " + myEvidence.Equals(evidenceCopy));

.NET Framework
Available since 1.1
Return to top
Show: