static void Main(string[] args) { int[] array1 = new int[] { 5, 10, 15, 20, 25, 30 }; int[] array2 = new int[] { 3, 6, 9, 12, 15, 18, 21, 24, 27 }; MergeArray mergeArray = new MergeArray(); int[] array3 = mergeArray.Merge(array1, array2); Console.Write(String.Join(",", array3)); Console.ReadKey(); }
static void Main(string[] args) { int[] array1 = new int[] { 5, 10, 15, 20, 25, 30 }; int[] array2 = new int[] { 3, 6, 9, 12, 15, 18, 21, 24, 27 }; MergeArray mergeArray = new MergeArray(); Console.WriteLine("Merge using LINQ"); mergeArray.Print(mergeArray.MergeUsingLINQ(array1, array2)); Console.WriteLine(); Console.WriteLine("Merge without LINQ"); mergeArray.Print(mergeArray.Merge(array1, array2)); Console.ReadKey(); }