Skip to main content
2 of 4
added 29 characters in body
BeeFriedman
  • 535
  • 1
  • 5
  • 14

When Should I Use a Static Class and When Should I Just Use Functions?

I am currently building a c# application that gets JSON data then it calculates something then stores the results in a database, what is the proper way to design the application.

This is how it's now

  • I have a static class that gets and parses the JSON then stores it in an object and all objects are then stored in an object list.
  • I then have a static class that loops through the object list and calculates the results base on each objects values.
  • I then have a static class that stores the results in the database.
  • And I have the main class that calls everything.

I think that I am overusing the static classes and could replace one or a couple with simple method (in the main class) instead of having a separate static class for it, am I?

BeeFriedman
  • 535
  • 1
  • 5
  • 14