«ThreadStaticVariable» (Задача)
Что выведет следующий код?
[ThreadStatic]
static readonly int Foo = 42;
void Main()
{
var thread = new Thread(() => Console.WriteLine(Foo));
thread.Start();
thread.Join();
}
Last updated
Was this helpful?
Что выведет следующий код?
[ThreadStatic]
static readonly int Foo = 42;
void Main()
{
var thread = new Thread(() => Console.WriteLine(Foo));
thread.Start();
thread.Join();
}
Last updated
Was this helpful?