Interface prefix (ARCH004)
Ce contenu n’est pas encore disponible dans votre langue.
Key dotnet.naming.interface-prefix · Severity warning · Category naming
Interface names should start with the I prefix. This is the standard .NET convention and clarifies that the type is an interface.
Incorrect
Section titled “Incorrect”public interface OrderRepository{ Order Find(int id);}Correct
Section titled “Correct”public interface IOrderRepository{ Order Find(int id);}Add the I prefix to the interface name. If needed, suppress the rule per project/workspace via except/ignore.