12.8. Inspect an Assembly's Evidence
Problem
You need to inspect the evidence that the runtime assigned to an assembly.
Solution
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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.