Jump to content
Tuts 4 You

How do I set a method as a setter using Dnlib?


CodeExplorer

Recommended Posts

Posted

How do I set a method as a setter using Dnlib?
setm.IsSetter = true; // set the method as setter (using Mono.Cecil)
Mono.Cecil declaration on MethodDefinition:
public bool get_IsSetter()
{
    return this.GetSemantics((MethodSemanticsAttributes.None | MethodSemanticsAttributes.Setter));
}

Where are these on Dnlib?

 

Posted

Oho! After checking it seems dnlib automatically adds MethodSemantics table!


So problem is solved!

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...