views:

117

answers:

3

I'm writing a group of methods which are a mix of private/public and need to put into the same region (using #region). I used method mentioned in here but I can not get this warning supressed. Please help.

[Edit] I need to supress this particular warning only - not for the whole project/solution. But I'm willing to know how to do that ^_^

+1  A: 

Are you happy to disable the rule for the whole project? If so, see if this works for you: Enabling or Disabling StyleCop Rules

ho1
+1  A: 

An alternative to suppressing stylecop warnings is to use them better. There is a rule that will insist that you do not use regions (disabled by default). By not doing so, your issue goes away.

Instead of using regions, use partial classes. Extract your region into a new partial class.

In this way you get stylecop compliance and code functional separation. The best of both worlds.

Philip Smith