Mám takový problém,
Chci si to pustit v Threadu ale chtel bych tam pouzivat i TextBox, Jak na to? zkousel jsem toto
PingToServer _Ping = new PingToServer();
Thread WorkerThread = new Thread(_Ping.Ping(IPCheck_TextBox));
WorkerThread.Start();
public class PingToServer
{
public void Ping(TextBox MyTextBox)
{
while (!_StopPing)
{
Ping MyPing = new Ping();
PingReply reply = MyPing.Send(IPAddress.Parse("77.75.72.3"));
}
}
}
Ale to hazi tento error
Error 2 Argument 1: cannot convert from 'void' to 'System.Threading.ParameterizedThreadStart'
Error 1 The best overloaded method match for 'System.Threading.Thread.Thread(System.Threading.ParameterizedThreadStart)' has some invalid arguments