Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Evidence::AddAssemblyEvidence<T> Method (T)

.NET Framework (current version)
 

Adds an evidence object of the specified type to the assembly-supplied evidence list.

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

public:
generic<typename T>
where T : EvidenceBase
[ComVisibleAttribute(false)]
void AddAssemblyEvidence(
	T evidence
)

Parameters

evidence
Type: T

The assembly evidence to add.

Type Parameters

T

The type of the object in evidence.

Exception Condition
ArgumentNullException

evidence is null.

InvalidOperationException

Evidence of type T is already in the list.

ArgumentException

evidence is not serializable.

Legacy evidence, that is, evidence that is not derived from EvidenceBase, cannot be added. Only evidence that is derived from EvidenceBase can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft