Csharp/C Sharp/Development Class/Evidence
Версия от 15:31, 26 мая 2010; (обсуждение)
GetHostEnumerator and GetAssemblyEnumerator
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());
Console.WriteLine("Press Enter to see next evidence.");
Console.ReadLine();
}
x = e.GetAssemblyEnumerator();
Console.WriteLine("ASSEMBLY EVIDENCE COLLECTION:");
while (x.MoveNext()) {
Console.WriteLine(x.Current.ToString());
Console.WriteLine("Press Enter to see next evidence.");
Console.ReadLine();
}
}
}