All,
How do I get the readSensor()
method to run in threads?
Thread location1Thread;
Thread location2Thread;
Logger location1 = new Logger("187.20.150.20", 2000);
Logger location2 = new Logger("187.20.150.21", 2000);
// The next 2 lines lines result in the following error message:
// "An object reference is required for the non-static field, method, or property...
location1Thread = new Thread(location1.readSensor);
location2Thread = new Thread(location2.readSensor);
I don't know how to resolve the error. Can anyone help me with this?
Thanks,
Bill