I have a char array and I want to assign values ββfrom the console. Here is my code:
char[] input = new char[n]; for (int i = 0; i < input.Length; i++) { input[i] = Console.ReadLine(); }
But I get the following error:
Cannot implicitly convert type 'System.ConsoleKeyInfo' to 'char'
Is there an easy way to fix this?
c #
Martin Dzhonov
source share