How to give output string in threadstart?
<p>I got this error </p>

<blockquote>
  <p>Method name expected.</p>
</blockquote>

<p>for this code:</p>

<pre><code>thSystem[index] = new Thread(new ThreadStart(cls.StartProcess(out string)));
</code></pre>

<p>How to do the overload for output value?</p>

<p>I want to take out string from StartProcess.</p>

<p>Below is my code:</p>

<p>//declare function</p>

<pre><code>       clsCallProcess cls = new clsCallProcess(index, url, name, timer);
       thSystem[index] = new Thread(new ThreadStart(cls.StartProcess(out string)));
       thSystem[index].Start();
</code></pre>

<p>//function</p>

<pre><code>      public class clsCallProcess
    {
        private int mindex;
        private string murl;
        private string mname;
        private int mtimer;
        bool IsRunning = true;

        // The constructor obtains the state information.
        public clsCallProcess(int index, string url, string name, int timer)
        {
            mindex = index;
            murl = url;
            mname = name;
            mtimer = timer;
        }

        public void StartProcess(out string result)
        {
            //First run checking
            result = "Connection Success";
            while (IsRunning)
            {
                Thread.Sleep(mtimer);
                IsRunning = false;

                try
                {
                    //FileManager.WriteActivityLog("Process Start", mname);
                    DateTime start = DateTime.Now;
                    string html = Utility.RequestWebpage(murl, string.Empty, true);
                    TimeSpan minisecond = DateTime.Now - start;

                    FileManager.WriteActivityLog("time:" + minisecond.Milliseconds.ToString() + ",html length:" + html.Length.ToString(), mname);
                    //FileManager.WriteActivityLog("html:" + html, mname);
                    //FileManager.WriteActivityLog("Process End", mname);
                }
                catch (Exception ex)
                {
                    ExceptionManager.WriteErrorLog(ex.Message, true, mname);
                    result = ex.Message;
                }
                IsRunning = true;
            }


        }
    }
</code></pre>
