41 lines
652 B
Plaintext
41 lines
652 B
Plaintext
== Why is this an issue?
|
|
|
|
By convention, namespaces within a project should start with the project default namespace, and end with the file's position within the project. Anything else may confuse maintainers and callers.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,csharp]
|
|
----
|
|
// file path: Gui/Screen.cs
|
|
namespace Green // Noncompliant
|
|
{
|
|
class Screen
|
|
{
|
|
}
|
|
}
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,csharp]
|
|
----
|
|
// file path: Gui/Screen.cs
|
|
namespace Gui
|
|
{
|
|
class Screen
|
|
{
|
|
}
|
|
}
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|