12.8. Inspect an Assembly's Evidence


You need to inspect the evidence that the runtime assigned to an assembly.


Obtain a System.Reflection.Assembly object that represents the assembly in which you are interested. Get the System.Security.Policy.Evidence class from the Evidence property of the Assembly object, and access the contained evidence objects using the GetEnumerator, GetHostEnumerator, or GetAssemblyEnumerator method of the Evidence class.

How It Works

The Evidence class represents a collection of evidence objects. The read-only Evidence property of the Assembly class returns an Evidence collection object that contains all of the evidence objects that the runtime assigned to the assembly as the assembly was loaded.

Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.