Questions tagged [static-classes]

In object oriented programming a static class is a class whose members must be accessed without an instance of the class. Its members must be created as static.

In object oriented programming a static class is a class whose members must be accessed without an instance of the class. Its members must be created as static.

289 questions
-2
votes
2 answers

What is the main difference between static class & Singleton class

here is two piece of class code one is for Singleton and other one is for static class. i like to understand in programming when one should use static class and when one should use Singleton class? both are used to hold the global object as a result…
Thomas
  • 33,544
  • 126
  • 357
  • 626
-2
votes
2 answers

access a Form1 public function from static class inside Form1

When writing this post i was checking all questions asked with related subject and couldent find a simple answer to this Newbs C# issue i would like ... if i may , to have as much as it can be a well-explaind answer (Please!) i made a public static…
LoneXcoder
  • 2,121
  • 6
  • 38
  • 76
-3
votes
1 answer

Static Class Object in template c++

template class Test { private: // static object definition static Test Global; public: // constructor Test(int x){ int y; y = x; } //static object definition inside template …
-6
votes
1 answer

Function in a static C# class that can return the values of all of its public member variables

internal static class Items { public static string ItemOne => "test"; public static string ItemTwo => "test two"; public static string ItemThree => "test three"; public static List GetItemsValuesList() { …
skm
  • 5,015
  • 8
  • 43
  • 104
1 2 3
19
20