using System;
using System.Collections.Generic;
using System.Linq;
//before:
int[] first1 = { 1, 2, 3 };
var second1 = new List<int> { 4, 5, 6 };
int[] all1 = first1.Union(second1).ToArray();
//all1 is { 1, 2, 3, 4, 5, 6 }
//in version 12:
List<int> first2 = [1, 2, 3];
int[] second2 = [5, 6];
int[] all2 = [.. first2, 4, .. second2];
//all1 is { 1, 2, 3, 4, 5, 6 }
Console.WriteLine(string.Join(", ", all1));
Console.WriteLine(string.Join(", ", all2));