Type declared outside a namespace (CA1050)
Esta página aún no está disponible en tu idioma.
Key dotnet.codequality.type-outside-namespace · Severity info · Category codequality
Microsoft analyzer CA1050. Flags a type in the global namespace, where it can collide with any other assembly’s type of the same name.
Incorrect
Section titled “Incorrect”public class Invoice{}Correct
Section titled “Correct”namespace Billing;
public class Invoice{}