Singleton Pattern for C#
Posted
by cam
on Stack Overflow
See other posts from Stack Overflow
or by cam
Published on 2010-04-19T11:42:32Z
Indexed on
2010/04/19
11:43 UTC
Read the original article
Hit count: 285
I need to store a bunch of variables that need to be accessed globally and I'm wondering if a singleton pattern would be applicable. From the examples I've seen, a singleton pattern is just a static class that can't be inherited. But the examples I've seen are overly complex for my needs. What would be the very simplest singleton class? Couldn't I just make a static, sealed class with some variables inside?
© Stack Overflow or respective owner