⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program.cs

📁 这是.net2005学习不可缺少的教程
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Array2
{
    class Program
    {
        static void Main(string[] args)
        {
            // 使用Array
            String[] firstArray ={ "how", "do", "you","do"};

            for(int count=0;count<firstArray.Length;count++)
            {
                Console.WriteLine("{0} - Type:{1}",firstArray.GetValue(count),firstArray.GetValue(count).GetType());
            }
            Console.WriteLine("Type of firstArray is {0}", firstArray.GetType());

            // 使用ArrayList
           ArrayList secondArray = new ArrayList();
            secondArray.Add("锄禾日当午");
            secondArray.Add("汗滴禾下土");
            secondArray.Add(36);
            secondArray.Add(true);

            for (int i = 0; i < secondArray.Count; i++)
            {
                Console.WriteLine("{0}\tType:{1}", secondArray[i], secondArray[i].GetType());
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -