Assembly Evidence Load - CSharp Custom Type

CSharp examples for Custom Type:Assembly

Description

Assembly Evidence Load

Demo Code


using System;/*  w  w w. j ava  2 s. c om*/
using System.Reflection;
using System.Collections;
using System.Security.Policy;

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());
            }
            x = e.GetAssemblyEnumerator();
            Console.WriteLine("ASSEMBLY EVIDENCE COLLECTION:");
            while(x.MoveNext())
            {
                Console.WriteLine(x.Current.ToString());
            }

        }
    }

Result


Related Tutorials