using System;
class CountInst
{
static int count = 0 ;
public CountInst ()
{
count ++;
}
~CountInst()
{
count --;
}
public static int getcount()
{
return count ;
}
}class CountDemo
{
public static void Main()
{
CountInst ob ; //CountInst ob = new CountInst()是不行的.
for (int i = 0 ; i < 10 ; i ++)
{
ob = new CountInst();  //为什么要在这里初始化对象而不能在前面
Console.WriteLine("Current count :" + CountInst.getcount());
}
}
}ob在这里有什么用呢?请各位高手指教一下.^_^