Jump to content

c# noob here... need help *SOLVED IT*

ok so im doing this:

 

Console.WriteLine("Would you prefer what is behind door number 1, 2 or 3? ");
 
            string userValue = Console.ReadLine();
 
            string message = (userValue == "1") ? "boat" : "strand of lint";
            Console.WriteLine("You won a {1} - {0} ", message,userValue);
 
Is it that the userValue that get's assigned to {1} and then the message is assigned to {0}. And does the order of message,userValue matter? 
 
EDIT: being stupid sorry for this post. 

         

CPU: Intel 3570 GPUs: Nvidia GTX 660Ti Case: Fractal design Define R4  Storage: 1TB WD Caviar Black & 240GB Hyper X 3k SSD Sound: Custom One Pros Keyboard: Ducky Shine 4 Mouse: Logitech G500

 

Link to comment
https://linustechtips.com/topic/229620-c-noob-here-need-help-solved-it/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×