Get the Evidence collection from the loaded assembly and Display the Host Evidence : Evidence « Security « C# / CSharp Tutorial






using System;
using System.Reflection;
using System.Collections;
using System.Security.Policy;

public class MainClass
{
    public static void Main(string[] args) 
    {
        Assembly a = Assembly.LoadFrom(args[0]);

        Evidence e = a.Evidence;
        
        IEnumerator x = e.GetHostEnumerator();
        Console.WriteLine("host evidence collection:");
        while(x.MoveNext()) 
        {
            Console.WriteLine(x.Current.ToString());
        }
    }
}








35.3.Evidence
35.3.1.Get the Evidence collection from the loaded assembly and Display the Host Evidence
35.3.2.Create Evidence