Static classes in C#, what's the pros/cons?

前端 未结 5 730
渐次进展
渐次进展 2021-01-13 12:23

I am programming a small game for my school assignment, the game is a simple 2D game with monsters, items and bullets. Basically you run around and tries to collect all the

5条回答
  •  余生分开走
    2021-01-13 13:00

    Pros:

    • Easy access
    • Easy coding

    Cons:

    • No thread safety
    • No encapsulation
    • Reduced maintainability

提交回复
热议问题