public static string[] makeArray()
Console.WriteLine("What is the size of your array?");
if (int.TryParse(Console.ReadLine(), out int size) && size >= 0)
string[] userArray = new string[size];
for (int i = 0; i < size; i++)
Console.Write($"Element {i}: ");
userArray[i] = Console.ReadLine();
Console.WriteLine("You made an error.");
return new string[] { "You made an error." };
public static void Main()
Console.WriteLine("Please make two equal sized arrays filled with integers.");
string[] array1 = makeArray();
Console.WriteLine("\n\nMake a second array:\n\n");
string[] array2 = makeArray();
if (array1.Length == array2.Length)
int[] array3 = new int[array1.Length * 2];
for (int i = 0; i < (array1.Length); i++)
if (!(int.TryParse(array1[i], out array3[i]) && int.TryParse(array2[i], out array3[i + array1.Length])))
int[] array4 = new int[array3.Length];
for (int j = 0; j < array3.Length; j++)
for (int i = 0; i < array3.Length; i++)
array3[minarray] = 2147483647;
Console.WriteLine("Your sorted combination of arrays is:");
for (int i = 0; i < array4.Length; i++)
Console.WriteLine($"{array4[i]}");
Console.WriteLine("Please restart the program and fill your arrays with integers.");
Console.WriteLine("Those arrays are not of the same size.");