True (my 5), but even this is not good enough; Singleton is more advanced and robust pattern.
Pay attention -- singleton is not the same as static class; it's better not to use static class -- please see my solution.
--SA

How come a person needs a protection against "a lesson", especially so experienced as Griff? He is not a kid. What's wrong with you today, John? Did not get enough sleep? Me too, so I would understand you.
--SA

I'm sure Griff knows the benefits of a singleton. Regarding how robust it is compared to a static class, any code is only as robust as the programmer makes it. I personally like static classes. They're handy. They're easily maintainable. They don't need to be instantiated by the programmer. They work. I have no complaints.

At to the lessons... we all need then. Anyway, I'm sure about myself, so I regularly take lesson no matter who is giving them to me. I think that being offended by a lesson is a sign of immaturity. And I don't know why should we speak about Griff. He can speak on his own.

You shouldn't avoid them to the poiint that your code is making all kinds of bizarre gyrations in the name of OOP purity, though. I use 'em simply 'caiuse it pisses OOP purists off. I could tell you stories... :)

Gentlemen, gentlemen! If you are going to fight, please take it outside! :laugh:
Singleton and static both have their place.
While I (generally) try to avoid "global" variables because they can cause so much grief, there are times when they are worth having - but in most cases they are indicative of a coder who doesn't actually know what he / she is doing.

The static / singleton debate is not new; for what it's worth, for beginners I would always recommend a static solution - it is far too easy to c*** up a singleton, or create two instances via inheritance if you don't understand what you are doing. It is a lot harder to do that with a static class as the compiler generally complains when you do. If you do get a singleton wrong it can be very difficult to understand and fix a bug based on just the symptoms! I would leave singletons until introducing Threading, when thread safety becomes a big factor - a lot easier to cope with in a singleton than a static class.
In addition it is a lot easier to explain how a static class works in term beginners can understand than to explain how the singleton pattern is functioning.
Anyone who wants to know how to declare a global in C# is clearly a beginner! :laugh:

Solution 4

Global? What is it? There is no such concept in .NET; I think this is because this concept is evil, so it was eliminated from the architecture. You never really need "global" variables, but static variables of class or structure can be made visible to whole application domain. If the access modifier of such variable is internal, it is visible to the part of application domain limited by the same assembly; if the access modifier is public, the variable is accessible in whole application domain from any assembly.

This is equivalent to the globally-accessed variable. However, this kind of programming should be best avoided.

In many cases the singleton needs to be shared between different threads. In this case, locking can be conveniently implemented inside singleton class in a way transparent to the users of the singleton.