Hi
I am loading assembly B from assembly A. I am trying to enumerate private members of the type located in assembly B.
How do I use ReflectionPermission to accomplish this task? I couldn't find anything useful on the MSDN.
Assembly asm = Assembly.LoadFrom("Chapter13.exe", AppDomain.CurrentDomain.Evidence);
//AppDomain.CurrentDomain.Load("Chapter13");
Type t = asm.GetType("Chapter13.ProtectedBuffer");
MemberInfo[] members = t.GetMembers(BindingFlags.NonPublic);
foreach (MemberInfo m in members)
{
Console.WriteLine(m.Name);
}
Kind regards PK