Zum Inhalt springen

Interface prefix (ARCH004)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.