C# - I'm trying to write an array which stores information from user input. In my code I use a string array which I named friends and then I proceed to use this method https://stackoverflow.com/a/230463/14764548. In the end I want the console app to display the stored information as an array.
enter code here
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
namespace arraysTut
{
class arraysTut
{
static void Main()
string[] friends = new string[2];
for(string i=0;i<friends.length;i++)
{
Console.WriteLine("First Friend: ");
friends[i] = Console.ReadLine();
Console.WriteLine("Second Friend: ");
friends[i] = Console.ReadLine();
Console.WriteLine(friends);
Console.ReadLine();
}
}
}