AddAssemblyEvidence(T) Method

Evidence.AddAssemblyEvidence(Of 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)

<ComVisibleAttribute(False)>
Public Sub AddAssemblyEvidence(Of T As EvidenceBase) (
	evidence As T
)

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:
© 2016 Microsoft