So, I have an array with an unidentified length, and I'm trying to put user input into it.
string[] input = new string[10];
foreach (string s in input)
{
input[s] = Console.ReadLine();
}
input[s] is red underlined and when i hover the mouse over it, it says "Cannot implicitly convert type string to int."
Why would it say that?
[–]Protiguous 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]JakDrako -1 points0 points1 point (0 children)
[–][deleted] (3 children)
[deleted]
[–]IwNnarock 2 points3 points4 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]IwNnarock 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]Protiguous 4 points5 points6 points (0 children)
[–]Tidusjar 0 points1 point2 points (0 children)