I found a problem - when I run this program, Visual Studio throws an exception - Format exception: Input string was not in a correct format.
string name = Console.ReadLine();
int age = int.Parse(Console.ReadLine());
int id = int.Parse(Console.ReadLine());
double salary = double.Parse(Console.ReadLine());
Console.WriteLine($"Name: {name}");
Console.WriteLine($"Age: {age}");
Console.WriteLine($"Employee ID: {id:D8}");
Console.WriteLine($"Salary: {salary:F2}");
Unfortunately, I can't find a mistake here. Can you help me, please? Or this is a bug in Visual Studio?
.Parse(Console.ReadLine()): to reproduce just putbla-bla-blawhenintordoublerequiredint.Parse()anddouble.Parse(), but you don't appear to have any idea what strings you're passing. You can't find a mistake because you didn't try to look for one. The exception message is not very informative, but Google will tell you exactly what it means. Didn't you bother?ReadLine. Also find more suitable search engine than disney.com. Google, Bing would instantly give you explanation of the exception, searching on MSDN or just clicking F1 in Visual Studio would have helped with explanation ofConsole.WriteLineorInt32.Parse. So far this post does not bring any new information for SO in addition to thousands existing variant of this excepotn.