C#C
C#3y ago
jack

❔ string with error onverting null literal or possible null value to non-nullable type.

i think the string isnt workijng and wen i use var it works but the only thing that isnt working is the varaible on the readline isnt functionng right
namespace Brack2
{
    class Program
    {
    
        static void Main(string [] args)
        {
            Console.WriteLine("Whats ur name");

            string playerName = Console.ReadLine();

            Console.WriteLine("Hi " + playerName);
       
            Console.ReadKey();
        }
    }
}
Was this page helpful?