日期:2014-05-16  浏览次数:20758 次

关于 c#中 对象数组
c#中申请对象数组是 Student[] student=new Student[5]吗?
下面的代码怎么都申请不出来。。。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleTempCS
{
    class Program
    {
        class MM { }
        static void Main(string[] args)//客户测试端
        {
            MM[] mm = new MM[1];
            Console.WriteLine((mm[0] == null).ToString());
        }
    }
}

输出的结果是True,也就是没申请出来,用的VS2013,求大牛帮助。。。
------解决方案--------------------
申请了,但是没有数据
MM[] mm = new MM[1];
mm[0]=new MM();