私は2回非同期に実行する必要があるクラスのメソッドを持っています。スレッドを使用して非同期にC#メソッドを実行します
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();
これはそれが機能する方法です: クラスには、パラメータとしてURLを受け取るコンストラクタを持っていますか?誰も助けることができますか?
あなたに合っているなら、BackgroundWorkerを試すこともできます –