エラーが発生しましたvar ts = System.Threading.ThreadStart(delegate()
(赤い線が下に表示されていますSystem.Threading.ThreadStart
)。何が問題ですか?
using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
public Program()
{
int[] iArray = new int[3];
iArray[0] = 2;
iArray[1] = 1;
iArray[2] = 5;
var ts = System.Threading.ThreadStart(delegate()
{
foreach (int i in iArray)
Foo(i);
});
}
public void Foo(int i)
{
Console.WriteLine(i + ",");
}
public static void Main(String[] args)
{
Program p = new Program();
}
}
}