我有一个类里面的方法需要异步执行两次。该类有一个构造函数,接受URL作为参数:
ABC abc= new ABC(Url);
// Create the thread object, passing in the abc.Read() method
// via a ThreadStart delegate. This does not start the thread.
Thread oThread = new Thread(new ThreadStart(abc.Read());
ABC abc1= new ABC(Url2)
// Create the thread object, passing in the abc.Read() method
// via a ThreadStart delegate. This does not start the thread.
Thread oThread1 = new Thread(new ThreadStart(abc1.Read());
// Start the thread
oThread.Start();
// Start the thread
oThread1.Start();
这是它的工作方式吗?有人可以帮忙吗?