Top "Static" questions

Static is a term used in some programming languages to define a function or data storage area (field) that is not bound to any specific object instance.

Using Server.MapPath() inside a static field in ASP.NET MVC

I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I asked a question here …

c# asp.net-mvc static lucene.net server.mappath
php static function

I have a question regarding static function in php. let's assume that I have a class class test { public function …

php class static member
Variably modified array at file scope

I want to create a constant static array to be used throughout my Objective-C implementation file similar to something like …

c objective-c arrays static constants
Static nested class in Java, why?

I was looking at the Java code for LinkedList and noticed that it made use of a static nested class, …

java class static member
Java: Static Class?

I have a class full of utility functions. Instantiating an instance of it makes no semantic sense, but I still …

java class oop static utility
Call static methods from regular ES6 class methods

What's the standard way to call static methods? I can think of using constructor or using the name of the …

javascript class static ecmascript-6 es6-class
Is it possible to create static classes in PHP (like in C#)?

I want to create a static class in PHP and have it behave like it does in C#, so Constructor …

php design-patterns oop static
Why can't I initialize non-const static member or static array in class?

Why can't I initialize non-const static member or static array in a class? class A { static const int a = 3; static …

c++ static constants
How to get a Static property with Reflection

So this seems pretty basic but I can't get it to work. I have an Object, and I am using …

.net reflection static
C++ static virtual members?

Is it possible in C++ to have a member function that is both static and virtual? Apparently, there isn't a …

c++ static virtual