📄 program.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace Example9_12 {
class Program {
static void Main(string[] args) {
ArrayList myArrayList = new ArrayList(3);
//分别插入“Hello ”和“World!”两个字符串到myArrayList末尾。
myArrayList.Add("Hello ");
myArrayList.Add("World!");
//输出myArrayList的容量。
Console.WriteLine("Capacity: {0}", myArrayList.Capacity);
//输出myArrayList中元素的个数。
Console.WriteLine("Count: {0}", myArrayList.Count);
//分别输出myArrayList中的两个元素。
Console.WriteLine(myArrayList[0]);
Console.WriteLine(myArrayList[1]);
Console.ReadLine();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -