Q:

About different ways of calling a static class in delphi

I am creating a class with class constructor
TStaticDynSettings = class
public
  class constructor create;
  class destructor destroy;
  class procedure Reload;
end;

Do all the other method in the class apart from create and destroy need to be a class methods?
I know for sure all the variables need to be a class var else the automatic initialization wont work.
what is the difference in calling the procedure as?..
var StDyn : TStaticDynSettings;`
StDyn.Reload;

and
TStaticDynSettings.Reload;

A:

1 - If you are not planning to create object instances of TStaticDynSettings you can use any of 3 forms:
type
  TStaticDynSettings = class
  public
    procedure Reload1;
    class procedure Reload2;
    class procedure Reload3; static;
  end;

call examples:
procedure Call1;
var Instance: TStaticDynSettings;

begin
  Instance.Reload1;
end;

procedure Call2;
begin
  TStaticDynSettings.Reload2;
end;

procedure Call3;
begin
  TStaticDynSettings.Reload3;
end;

The difference is a hidden argument passed in Reload1 and Reload2 methods and not passed in Reload3.
The hidden argument is a reference to object instance in Reload1 (and not used since you are not creating object instance), and a class reference in Reload2 (which probably also unnecessary in your case, assuming a class reference is known at compile time).
The first form (Reload1) is misleading because it assumes using an object reference and so should be avoided (though it works).
The third form (Reload3) is preferable if you are not using class references that are unknown at compile time.
2 - There is no difference (not counting an overhead of using unnecessary object variable if the first case).

