Skip to content

Gendarme.Rules.Design.TypesShouldBeInsideNamespacesRule(git)

Sebastien Pouliot edited this page Mar 2, 2011 · 1 revision

TypesShouldBeInsideNamespacesRule

Assembly: Gendarme.Rules.Design
Version: git

Description

This rule will fire if a type which is visible outside the assembly is not declared within a namespace. Using namespaces greatly reduces the probability of name collisions, allows tools such as auto-complete to operate better, and can make the assemblies API clearer.

Examples

Bad example:

using System;
public class Configuration {
}

Good example:

using System;
namespace My.Stuff {
    public class Configuration {
    }
}

Source code

You can browse the latest source code of this rule on github.com

Clone this wiki locally