C# 主线程中如何修改其他线程中的变量值

using System;
using System.Threading;

namespace ConsoleApp20
{
public class Example
{
public void Main()
{
Thread thread1 = new Thread(() => { new Test(); });
thread1.Start();
}
}
public class Test
{
int a = 0;
public Test()
{
while (a == 0)
{
Thread.Sleep(1000);
}
Console.WriteLine(a.ToString());
Console.ReadKey();
}
}
}

请问主线程中如何通过访问线程thread1来修改Test中a的值?

初始化窗体时加上这句Control.CheckForIllegalCrossThreadCalls = false;