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

前端 未结 5 722
渐次进展
渐次进展 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:01

    If your application is multithreaded you might need to think about the issues around multiple threads accessing and modifying static instances. Here's a good artical on threading:

    http://www.yoda.arachsys.com/csharp/threads/

提交回复
热议问题