Static classes in c#

前端 未结 8 712
别那么骄傲
别那么骄傲 2021-01-18 03:09

In answering this question (https://stackoverflow.com/questions/352317/c-coding-question#352327), it got me wondering...

Is there any danger in regarding a static cl

8条回答
  •  迷失自我
    2021-01-18 03:58

    In context of singleton implementation there is no any danger, I think. I often do the same, imlementing singletone via static class. Logically, object reference isn't necessary if it's alone and unique.

提交回复
热议问题