How to return a static class instance in c#

后端 未结 5 2051
花落未央
花落未央 2021-01-17 21:48

I would like to get an instance of a static class, but I can’t seem to do this without implementing a singleton wrapper on a non-static class– is this possible, or am I miss

5条回答
  •  旧时难觅i
    2021-01-17 22:41

    From your comments I assume your solution would be:

    Make your class non-static. (Just keep the methods static.)

提交回复
热议问题