Ir al contenido

Interface prefix (ARCH004)

Esta página aún no está disponible en tu idioma.

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.

public interface OrderRepository
{
Order Find(int id);
}
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.