using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
//感觉自己得到真正的技术升华了,哈哈哈,举一反三
namespace klj
{
class Program
{
static void Main(string[] arg)
{
ArrayList list1 = new ArrayList();
ArrayList list2 = new ArrayList();
string[] str1 = { "a", "b", "c", "d", "e" };
string[] str2 = { "d", "e", "f", "g", "h" };
for (int i = 0; i < str1.Length; i++)
{
list1.Add(str1[i]);
Console.Write(list1[i] + " ");
}
Console.WriteLine();
for (int i = 0; i < str2.Length; i++)
{
list2.Add(str2[i]);
Console.Write(list2[i] + " ");
}
Console.WriteLine();
for (int i = 0; i < list2.Count; i++)
{
if (!list1.Contains(list2[i]))
{
list1.Add(list2[i]);
}
}
for (int i = 0; i < list1.Count; i++)
{
Console.Write(list1[i]);
}
//if (!list1.Contains(list2))
//{
// Console.Write((string)list1,(string)list2);
//}
Console.ReadKey();
}
}
}