2

I have a problem with Console.WriteLine()

When I try to print mathematical signs (+ , *) and other symbols (@, #, \, ~ , ;, ", '), I receive Unhadled.Exception: System.NullReferenceException.

If I insert a letter from the alphabet or a number everything is alright.

string expression = Console.ReadLine();

        foreach (char symbol in expression)
        {
            Console.WriteLine(symbol);
        }

Screenshot of NullReferenceException image 2 http://i.imgur.com/vFrKfVG.png

Proof Image image 3 http://i.imgur.com/U2k0zWS.jpg

zdzdz
  • 21
  • 3

0 Answers0