Answers for "combine array c# with unique value"

C#
0

combine array c# with unique value

using System;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		string[] array1 = { "Ice", "Box", "Fox", "Glass", "Dog" };
		string[] array2 = { "Pig", "Box", "Cra", "Ice" };
 
		var result = array1.Union(array2).ToArray();
		Array.ForEach(result, x => Console.WriteLine(x));
	}
}
Posted by: Guest on September-13-2020

C# Answers by Framework

Browse Popular Code Answers by Language