This project is read-only.

New rule: DoNotWrapPublicInterfaceIntoConditionalBlock

Apr 10, 2011 at 6:32 AM

This rule may be more FxCop-ish.

Do not wrap parts of class public interface into #if DEBUG block.


public class Item
    int GetLength();
This will generate different code for debug and retail builds and may introduce tricky issues.

Apr 12, 2011 at 4:34 PM

Lets see what everyone else thinks. Maybe this is a common pattern that people do actually need. Thoughts everyone please?

Apr 13, 2011 at 8:40 AM

In my opinion, the rule is

  • fuzzy (there could be any preprocessor directive)
  • uncommon (never saw anything like that)
  • doesn't relate to style

Best regards,
Oleg Shuruev

Apr 14, 2011 at 1:31 AM

I don't think this has anything to do with style.