Is sa1200 All using directives must be placed inside the namespace (StyleCop) purely cosmetic? [duplicate]

StackOverflow https://stackoverflow.com/questions/1071797

  •  21-08-2019
  •  | 
  •  

Question

Possible Duplicate:
Should Usings be inside or outside the namespace

sa1200 All using directives must be placed inside the namespace (StyleCop)

Is this just for code readibility or is there any actual advantage to doing so? Does it help the GC somehow?

OTHER TIPS

If you have multiple namespaces in your project, you can limit which namespaces are used by each one individually.

This might come in handy if there were class names in two different namespaces that were the same. One might be the default in one part of your project, while the other could be the default in another.

Yes they look for some really fringe cases for these rules.

There is no runtime difference. It's purely a compile time (and development experience) change. The file, compiled IL will be identical in either case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top