Simply, decorate your class or function with this code :
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "1000:YouShouldntBeCoding", MessageId = "1#", Justification="Leave me allone annoying compilator!")]
You can find more info : here
I found that information in the Rob Conery’s blog.