I wrote a code, and the line
string thing = Console.ReadLine();
causes a problem. Xamarin shows me that it did not read in the input this command, so the variable thing becomes null.
I found from other questions and answers here that there are two output types of an application, Window and Console. So, mine probably is not the second one.
But I can't find how to switch to console. I have the latest MonoDevelop and Xamarin, and yet this problem remains. Does anyone know what could help?
Any advice will be highly appreciated!
Rob G Pretty much has it so I'm not sure why you can't see it. Here's the click-by-click for completeness.
For console output from Xamarin:
Right click the project you have set as startup project, then do:
Options >> Expand 'Run' >> General >> Check 'Run on external console'
Once this is set, execution will halt on Console.ReadLine();
There is no need to check the 'Pause console output' checkbox. This simply holds the console open at the end of execution with a 'Press any key to continue...'.
Try right clicking on the "options" list item on the menu for your project and making sure Run on external console is marked. It's in the Run -> General tab, I think.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With