Navigation:  StyleCop 4.3 > StyleCop 4.3 Rules > Spacing Rules >

SA1006: PreprocessorKeywordsMustNotBePrecededBySpace

Previous pageReturn to chapter overviewNext page
StyleCop 4.3

Send comments on this topic.

SA1006: PreprocessorKeywordsMustNotBePrecededBySpace
Glossary Item Box
TypeName

PreprocessorKeywordsMustNotBePrecededBySpace

CheckId

SA1006

Category

Spacing Rules

 

Cause

A C# preprocessor-type keyword is preceded by space.

Rule Description

A violation of this rule occurs when the preprocessor-type keyword in a preprocessor directive is preceded by space. For example:

   # if Debug

There should not be any whitespace between the opening hash mark and the preprocessor-type keyword:

   #if Debug

How to Fix Violations

To fix a violation of this rule, ensure that there is no whitespace between the opening hash mark and the preprocessor-type keyword.

 


© Microsoft Corporation. All Rights Reserved.