tagged [static]

c# : console application - static methods

c# : console application - static methods why in C#, console application, in "program" class , which is default, all methods have to be static along with

6 Nov at 06:3

are static classes shared among different threads in C#

are static classes shared among different threads in C# I need to share a value between threads without exceeding it's boundary. Does a static variable do this?

22 Mar at 16:33

Class (static) variables and methods

Class (static) variables and methods How do I create class (i.e. [static](https://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods)) variables or methods in Python?

3 Dec at 07:36

What is the difference between statically typed and dynamically typed languages?

What is the difference between statically typed and dynamically typed languages? What does it mean when we say a language is dynamically typed versus statically typed?

What is the c# equivalent of public final static in java

What is the c# equivalent of public final static in java In Java I can write: Is there any equivalent in C#?

16 Aug at 05:57

What is the difference between a static and a non-static initialization code block

What is the difference between a static and a non-static initialization code block My question is about one particular usage of static keyword. It is possible to use `static` keyword to cover a code b...

2 Nov at 13:10

Can I override and overload static methods in Java?

Can I override and overload static methods in Java? I'd like to know: 1. Why can't static methods be overridden in Java? 2. Can static methods be overloaded in Java?

20 Aug at 13:30

What is the use of static constructors?

What is the use of static constructors? Please explain to me the use of static constructor. Why and when would we create a static constructor and is it possible to overload one?

20 Mar at 16:15

How to get the current class' name in a static method?

How to get the current class' name in a static method? Normally I can call this.GetType(), but I can't access this in a static method. How can we check it?

17 Feb at 10:6

What is the use of static variable in C#? When to use it? Why can't I declare the static variable inside method?

What is the use of static variable in C#? When to use it? Why can't I declare the static variable inside method? I have searched about static variables in C#, but I am still not getting what its use i...

23 Apr at 12:56

What does "static" mean in C?

What does "static" mean in C? I've seen the word `static` used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)?

29 Oct at 15:42

Static methods in Python?

Static methods in Python? Can I define a [static method](https://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods) which I can call directly on the class instance? e.g.,

29 Nov at 00:11

Are C# auto-implemented static properties thread-safe?

Are C# auto-implemented static properties thread-safe? I would like to know if C# automatically implemented properties, like `public static T Prop { get; set; }`, are thread-safe or not. Thanks!

What does the "static" modifier after "import" mean?

What does the "static" modifier after "import" mean? When used like this: what's the difference between `import static com.showboy.Myclass` and `import com.showboy.Myclass`?

19 May at 11:21

Static constructors cause a performance overhead?

Static constructors cause a performance overhead? Recently read in a article on dotnetpearls.com [here](http://dotnetperls.com/static-constructor) saying that static ctors take a substantial amount of...

15 Nov at 07:30

c# print the class name from within a static function

c# print the class name from within a static function Is it possible to print the class name from within a static function? e.g ...

16 Feb at 08:36

Can someone tell me what Strong typing and weak typing means and which one is better?

Can someone tell me what Strong typing and weak typing means and which one is better? Can someone tell me what Strong typing and weak typing means and which one is better?

When is a static constructor called in C#?

When is a static constructor called in C#? When I have class containing a static constructor, is that constructor called when the assembly containing the class is first loaded or when the first refere...

17 Sep at 07:58

Why must C# operator overloads be static?

Why must C# operator overloads be static? Why does C# require operator overloads to be static methods rather than member functions (like C++)? (Perhaps more specifically: what was the design motivatio...

What is the difference between const and static in C#?

What is the difference between const and static in C#? I am eager to know the difference between a `const` variable and a `static` variable. Is a `const` variable also always `static`? What is the dif...

2 Nov at 20:32

In laymans terms, what does 'static' mean in Java?

In laymans terms, what does 'static' mean in Java? I have been told several definitions for it, looked on Wikipedia, but as a beginner to Java I'm still not sure what it means. Anybody fluent in Java?

16 Oct at 19:28

Does "default" serialization in C# serialize static fields?

Does "default" serialization in C# serialize static fields? By "default" I mean just using the [Serializable] attribute on the class. I want to say that no, static fields would not be serialized, but ...

11 Oct at 01:55

What is the difference between static, internal and public constructors?

What is the difference between static, internal and public constructors? What is the difference between static, internal and public constructors? Why do we need to create all of them together?

How can I perform static code analysis in PHP?

How can I perform static code analysis in PHP? Is there a static analysis tool for PHP source files? The binary itself can check for syntax errors, but I'm looking for something that does more, like: ...

7 Feb at 16:36

C# static class constructor

C# static class constructor Is there a work around on how to create a constructor for static class? I need some data to be loaded when the class is initialized but I need one and only one object.

21 Sep at 07:45