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

小白问题,System.Array.CreateInstance 为什么VS必须让我加上System.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace ConsoleApplication1
{
    class MainClass
    {
        static void Main()
        {
            int[] lengthsArray = new int[2] { 3, 5 };
            int[] boundsArray = new int[2] { 2, 3 };
            System.Array.CreateInstance(typeof(String), lengthsArray, boundsArray);

        }
    }
}


System.Array.CreateInstance(typeof(String), lengthsArray, boundsArray); 当不加System. 时,为什么程序报错,即Array.CreateInstance报错
已使用 using System;
------解决方案--------------------
vs2010下,不加System.也没报错
楼主是不是在相同的namespace下有Array这个类?