Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Hi, first of all I'm new to C# And programming in general... I'm getting this error and
I don't know why, I mean, the variable is declared above.
Help please.

http://s13.postimg.org/qztdqd6fr/2313123123.png
Posted

1 solution

Nevermind, I made a mistake by not getting the user input before.
weaponSelected = Console.ReadLine();
Thanks a lot!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-May-15 17:57pm    
How you could post it as an answer? How could you even accept it formally?
Please avoid doing so; this is considered as abuse.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900