I want to add multiple values into an array, but I want to stop when I feel like it.
Here is the condition I added
while (numbers[i] != 10)
{
i++;
numbers[i] = int.Parse(Console.ReadLine());
Console.WriteLine(numbers[i]);
}
It will stop when the value entered is 10. But I want it to stop when I just press ENTER.
How do I do this?