Most voted "lifespan" questions
7 questions
Sort by count of
-
43
votes1
answer2413
viewsWhat’s the difference between scope and lifespan?
What is scope? What is life time? They get confused? Visibility has something to do with this too?
-
25
votes1
answer2636
viewsWhat is the difference between const and readonly?
Read-only constants and fields cannot be modified, as can be seen in the documentation: const Constant fields and locations are not variable and cannot be modified. readonly When a field declaration…
-
15
votes4
answers1443
viewsShould an enumeration be constant in the lifetime of the solution?
Modern languages often have a type of enumeration that is usually a range of related constants. Its members are usually constant. In most languages this is even guaranteed by the compiler. But…
software-engineering encoding-style enums constant lifespanasked 10 years, 5 months ago Maniero 444,682 -
14
votes1
answer615
viewsHow does the lifespan of static variables work?
I just saw a question about C. In it the following code was shown: #include <stdio.h> int main() { static int a = 5; printf("%d", a--); if(a) main(); return 0; } Example running on repl.it.…
-
3
votes2
answers5016
viewsSession C# how does it work?
What is the lifetime of an ASP.NET MVC Session, and how to find out how to find out the remaining time and how to add more time to Session (if possible)? There is another form of value guard that is…
-
1
votes1
answer202
viewsWhat is the lifetime of a variable in the method, class and module?
I know that a variable declared in a method lasts for as long as the scope of the method. How python has the concept of class variables, until when lasts a variable declared in the class? And a…
-
0
votes1
answer116
viewsLua has static and dynamic variables in the heap?
Does the storage binding (related to the variable’s lifetime) allow static variables? Allows dynamic variables of heap?