C#创建对象时的用法
class Program{
int count;
public int Max
{
get;
set;
}
public void increase()
{
for (int i = 0; i < Max; i++)
{
count++;
}
}
static void Main(string[] args)
{
Thread[] threads = new Thread[100];
Program sample = new Program() { Max = 100 };
这句怎么理解? 不太明白怎么这样用。