I'm currently trying to create a separate thread that will display a Server Message but I get thrown an error, saying I'm using the wrong thread for label 2.
My code looks like this
Thread MOTD = new Thread(() =>
{
System.Net.WebClient wc = new System.Net.WebClient();
// Use webclient to download webpage from target URL
byte[] raw = wc.DownloadData("https://targaryentech.com/Backend/test.txt");
// Convert to string
string webData = System.Text.Encoding.UTF8.GetString(raw);
// String to MessageBox
label2.Text = webData;
});
MOTD.Start();