Interface object name guide
Interface names in C# and many other languages start with a capital I — IDisposable, IEnumerable. This rule enforces the same convention for AL interface objects: the name must start with a capital I followed immediately by an uppercase letter, with no space after the I. Without the prefix, a type named PaymentProcessor could be a codeunit or an interface — the reader has no way to tell without navigating to the definition.
Example
interface PaymentProcessor // Interface object name guide [LC0054]
{
}Prefix the interface name with I:
interface IPaymentProcessor
{
}Prefixes
Setting mandatoryAffixes or mandatoryPrefix in the AppSourceCop.json file enables this rule to handle prefixes. The AppSourceCop analyzer itself does not need to be activated — the configuration file is used solely to retrieve affixes, preventing duplicate setup for AppSource development scenarios.
interface "ABC ISubscriber"
{
}AL vs C#
procedure Foo(Subscriber: Interface ISubscriber)
void Foo(ISubscriber subscriber)
There are differences between AL and C#. When a parameter or variable is declared we include both type and name. That is not the case in C#. So you could argue that the benefits of the I prefix gets lost in AL.
See also
- Names of Classes, Structs, and Interfaces on Microsoft Learn