boosa Liberman

boosa Liberman

  • NA
  • 5
  • 9.7k

Thread and passing params

Nov 11 2010 4:46 AM
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)