Hi Steve, Yes, custom attributes are not comparable.
You need to iterate yourself over the custom attributes collection and remove the one whose custom attribute type is DebuggerHiddenAttributes. Best, Jb On Sat, Aug 10, 2013 at 1:39 PM, Steve Queen <[email protected]> wrote: > Hi, > > How to remove DebuggerHiddenAttribute from all methods? Thanks in advance. > > > I'm trying this code not work. > > ModuleDefinition module = ...; > MethodDefinition targetMethod = ...; > MethodReference attributeConstructor = module.Import( > typeof(DebuggerHiddenAttribute).GetConstructor(Type.EmptyTypes)); > targetMethod.CustomAttributes.Remove(new > CustomAttribute(attributeConstructor)); > module.Write(...); > > -- > -- > -- > mono-cecil > --- > You received this message because you are subscribed to the Google Groups > "mono-cecil" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
