using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
//namespace _01字符串方法
//{
// class Progam
// {
// static void Main(string[] arg)
// {
// Console.WriteLine("我爱你");
// Console.ReadKey();
// }
// }
//}
//单个集合和多个数字的集合,如何显示
namespace jilj
{
class program
{
static void Main(string[] arg)
{
ArrayList list = new ArrayList();
list.Add(0);
list.Add(1.5);
list.Add("玩手机");
list.Add('男');
int[] num = new int[] { 0, 1, 2, 3, 4 };
list.AddRange(num);
//list.Remove(0);
//list.Clear();
//list.Remove(2);
if (list.Contains(2.0))
{
list.Remove(2.0);
}
else
{
Console.WriteLine("集合中不包括此元素");
}
for (int i = 0; i < list.Count; i++)
{
Console.WriteLine(list[i]);
}
Console.ReadKey();
}
}
}