ModuleDefMD module = ModuleDefMD.Load("MyAssembly.dll"); MethodDef method = module.Find("MyMethod"); byte[] signature = method.Signature.ReadSignature();
ModuleDefMD module = ModuleDefMD.Load("MyAssembly.dll"); FieldDef field = module.Find("MyField"); byte[] signature = field.Signature.ReadSignature();This example is similar to the previous one, but instead of reading the signature of a method, we read the signature of a field called "MyField". Package library: dnlib.