If a snake swallows someone in a dream, it means that he will reach a powerful position. If one sees a snake sitting over his head in a dream, it means that he will earn the respect of people in authority. A field which is covered with snakes in a dream represents a destructive rain.
Make the class of the single instance responsible for access and initialization on first use. The single instance is a private static attribute. The accessor function is a public static method. The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance. It is named after the singleton set, which is defined to be a set containing one element. The office of the President of the United States is a Singleton.
Here we have not used any instance of class inside static main method. This is the use of static method in our applications. Introduction. MSDN Definition: A static class is basically the same as a non-static class, but there is one difference: a static class cannot be instantiated. In other words, we cannot use the new keyword to create a variable of the class type. Because there is no instance variable, we access the members of a static class by using the class name itself. C# fields must be declared inside a class.