public class Example
{
public static void Main()
{
Console.Write("<< Union 예제 >> \n");
string[] words1 = { "Mercury", "Venus", "Earth", "Jupiter" };
string[] words2 = { "Mercury", "Earth", "Mars", "Jupiter" };
IEnumerable<string> query = from unionexam in words1.Union(words2)
select unionexam;
foreach (var str in query)
{
Console.WriteLine(str);
}
Console.WriteLine(System.Environment.NewLine);
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}