Found an ugly solution for the 1st question:
Assembly assembly = Assembly.LoadFrom(@"xxx.dll");
types = assembly.GetTypes();
foreach (Type t in types)
{
MethodInfo[] mis = t.GetMethods();
foreach (MethodInfo mi in mis)
{
if (mi.Name.StartsWith("get_aaa", StringComparison.OrdinalIgnoreCase))
{
MethodBody mb = mi.GetMethodBody();
if (mb != null)
{
byte[] msil = mb.GetILAsByteArray();
}
}
}
}
2nd question is still pending...