C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,121 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
the offending code has
using System;
using System.Windows.Forms;
using System.IO;
using System.Net;
using System.Threading;
and the flagged statement:
new Thread(delegate { getStockInfo(reslt); }).Start();
........
void getStockInfo(string Reslt)
{
.............
}
reslt is of type string and has been assigned value before the thread start.
this is the first attempt to to use thread
Try a short fix:
new Thread( ( ) => getStockInfo( reslt ) ).Start( );