Tentatively, you can also achive this throught he use of things in the System.Reflection.Emit namespace and I believe it's possible to provide the implementation of a method through the use of LINQ expression trees. Which is kind of neat:
var assembly = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("TestAssembly"), AssemblyBuilderAccess.RunAndSave);
var mod = assembly.DefineDynamicModule("TestModule");
var type = mod.DefineType("TestType");
var method = type.DefineMethod("Increment", MethodAttributes.Public, typeof(int), Type.EmptyTypes);
Expression<Func<int, int>> inc = (a) => a + 1; // this is cool
inc.CompileToMethod(method);
It might look a bit daunting at first, but it's really cool stuff, and you let the compiler generate the hard stuff, the method implementation. But you can't really create fields like this, that's gonna require some IL. Which is great fun but really tedious work.
DISCLAIMER:
I haven't tried to run the above code. But I know it goes something like that, it's been a while since I've done something like that.