Csharp/CSharp Tutorial/Assembly/Evidence

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

My Evidence Viewer

using System;
using System.Reflection;
using System.Security.Policy;
using System.Collections;
  class Program
  {
    static void Main(string[] args)
    {
      Assembly asm = Assembly.LoadFrom("path to assembly");
      DisplayAsmEvidence(asm);
    }
    private static void DisplayAsmEvidence(Assembly asm)
    {
      Evidence e = asm.Evidence;
      IEnumerator itfEnum = e.GetHostEnumerator();
      while (itfEnum.MoveNext())
      {
        Console.WriteLine(itfEnum.Current);
      }
    }
  }