P
P
ProblemBook.NET
Search…
P
P
ProblemBook.NET
ProblemBook.NET
LANGS
Задачник.NET
ProblemBook.NET
Oop
Strings
Linq
Multithreading
“ThreadStaticVariable” (Solution)
“LockSlimInFinalizer” (Solution)
“ThreadStaticVariable” (Problem)
“LockSlimInFinalizer” (Problem)
ValueTypes
Math
Summary
Introduction
Attribution-NonCommercial-NoDerivatives 4.0 International
Powered By
GitBook
“ThreadStaticVariable” (Problem)
What will the following code display?
1
[
ThreadStatic
]
2
static
readonly
int
Foo
=
42
;
3
4
void
Main
()
5
{
6
var
thread
=
new
Thread
(()
=>
Console
.
WriteLine
(
Foo
));
7
thread
.
Start
();
8
thread
.
Join
();
9
}
Copied!
Solution
Previous
“LockSlimInFinalizer” (Solution)
Next
“LockSlimInFinalizer” (Problem)
Last modified
3yr ago
Copy link