background image

注:以下题目均默认已正确引入命名空间

3. int[][]   myArray3   =   new   int[3][]   {new   int[3]{5,6,2},new   int[5]
{6,9,7,8,3},new int[2]{3,2}}; 则,myArray3[2][2]的值是多少:
结果:

4. 请给出以下程序的输出结果
namespace TestPaper
{
    public class TestClass 
    {
        public TestClass() {
            _value = "Constructor Value";
        }

        public void OutputData() {
            Console.WriteLine("_value = {0}", _value);
        }

        public string _value = "Default Initialize Value";
    }

    class Program
    {
        static void Main(string[] args)
        {
            TestClass test1 = new TestClass();
            test1.OutputData();
            TestClass test2 = new TestClass() { _value = "Initialize Value" };
            test2.OutputData();
        }
    }
}
结果:

5. 请指出以下程序错误
namespace TestPaper
{
    class Program
    {

 2 / 16