1
Answer

Thread and passing params

boosa Liberman

boosa Liberman

14y
2.7k
1
hi guys, i am having some trouble with the threading thingi :)
i am kinda newbie, but i am learning... (hopefully....)

i am getting this error:
"Method name expected" (also near the error i get "11") have no idea what it means....

when i try to:

  ---->   ThreadStart Monitor = new ThreadStart(MonitorAndUpdate(ref SensorReadings, message, SensorID));   <---- this is where i get the error
            Thread thread = new Thread(Monitor);
            thread.Start();


when:

public void MonitorAndUpdate(ref List<SensorReadings> SnsReadings, string Msg, ushort SensorID)
        {
           
                foreach (SensorReadings Info in SnsReadings)
                {
                    if (Info.SensorID == SensorID)
                        rTxtVals.Text = Info.GraphVals;
                }      
         
        }



can someone try and help me out here with this?
Answers (1)