jeudi 26 juillet 2018

Utility : static class with static methods OR non-static class with static methods

Best design solution amongst the below for a Utility Class (say logger class):

  1. static class with static methods.
  2. non-static class with static methods with a private constructor (throwing method not implemented)
  3. non-static class with static methods having a singleton

I saw this answer but found it oversimplified & superficial.

Please elaborate. Language used :- C# (just for reference)

Aucun commentaire:

Enregistrer un commentaire