How do I expand (by code) an assembly of flags?
3 answers
If you don't want to use reflection, you can check
CCI http://ccimetadata.codeplex.com/Wiki/View.aspx?title=API%20overview or
Mono.Cecil http://www.mono-project.com/Cecil
+3
source to share
Check out this link, it describes a similar situation with your request. The accepted answer describes how you can use reflection and Module.GetPEKind . This might help you.
Edit: a little late, but here's an example:
namespace ConsoleApplication1
{
using System.Reflection;
public class Program
{
public static void Main()
{
Assembly a = Assembly.GetExecutingAssembly();
PortableExecutableKinds peKind;
ImageFileMachine machine;
a.ManifestModule.GetPEKind(out peKind, out machine);
}
}
}
+10
source to share