c#
The last statement won't run c#! [duplicate]
This question already has an answer here: Why is the console window closing immediately without displaying my output? 18 answers Please help! I ran this program and entered all 3 inputs but the last writeline code wouldn't run and the program just exits itself! I have no idea because I follow the book exactly! string userName = ""; int userAge = 0; int currentYear = 0; Console.Write("Please enter your name: "); userName = Console.ReadLine(); Console.Write("Please enter your age: "); userAge = Convert.ToInt32(Console.ReadLine()); Console.Write("Please enter the current year: "); currentYear = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Hello World! My name is {0} and I am {1} years old. I was born in {2}.", userName, userAge, currentYear - userAge);
at the end of the code add: Console.ReadLine();
Related Links
SelectNextControl not working on telerik drop down list
Nested loop (level: beginner)
Xamarin - how to change image source dynamically?
OOP Fundamental - C# Refactoring?
How can i make that when the player is getting close to a waypoint he will slow down and then will speed up again?
How to Prevent user entries in Bot Chat text window C#
Plot a contour in chart(mainly algorithm) in c# WPF
Func/Action vs. local functions [duplicate]
entity hasoptional foreign keyone to one
OpenSSL.NET decrypting with GOST using c#
Mailkit: Could I get the original sender from a forwarded e-mail?
JavaScript way to convert C# List<string> value?
Notifications for WinForms / WPF application
Hashing Json result to detect changes
Using classes exported by C# dll in Delphi
Taking screenshot of dynamically opened windows form c#