Compiler Error CS1671
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
{
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: