# «ThreadStaticVariable» (Задача)

Что выведет следующий код?

```csharp
[ThreadStatic]
static readonly int Foo = 42;

void Main()
{
  var thread = new Thread(() => Console.WriteLine(Foo));
  thread.Start();
  thread.Join();
}
```

[Решение](https://andreyakinshin.gitbook.io/problembookdotnet/ru/multithreading/threadstaticvariable-s)
