📄 program.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 + -