In type declarations, visibility specifiers should be declared in ascending order. This aids readability and preserves a neat and maintainable type API.
Visibility specifiers should follow the following order:
This rule excludes cases where visibility sections declare a member that is used in later visibility sections, such as the below:
type
TMyType = class(TObject)
public
type
TMyDescendant = class(TObject);
end;
private
procedure DoSecretThing(Obj: TMyDescendant);
public
procedure DoPublicThing(Obj: TMyDescendant);
end;
Reorder the visibility sections within the type declaration into ascending order.