Is it possible to read the elements of an array from the same line (from Console) in C#? I know it's possible to read multiple inputs from the console and storing the individual parts in different variables using Split(). But I can't understand how to do it in arrays.
Code
for (int i = 0; i < arrival.Length; i++)
{
arrival[i] = int.Parse(Console.ReadLine());
}
For example, I have to enter the elements 34 35 36 37 in the array. If I use the above mentioned code, I have to enter each element in a separate line. But what I need is, if I enter 34 35 36 37 in the Console, it must store each number as an element in the array. How to do this?