Compiler Error CS1671
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Compiler Error CS1671 

Error Message

A namespace declaration cannot have modifiers or attributes

Modifiers are not meaningful when applied to a namespace, so they are not allowed.

The following sample generates CS1671:

// CS1671.cs
public namespace NS // CS1671

© 2016 Microsoft