The erload:System.Reflection.Emit.MethodBuilder.SetCustomAttribute method can interact with the MethodBuilder.SetImplementationFlags(System.Reflection.MethodImplAttributes) method when the two methods are used in combination. See the Remarks section of the MethodBuilder.SetImplementationFlags(System.Reflection.MethodImplAttributes) method for details.