Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Kimmax109875yWhat @TheCommoner282 said
Also, at least dotnet core, will wrap it for you, so it doesn't just quits, IF you're in release mode. So some #if DEBUG for that ReadLine() should be good -
guarrions195y@TheCommoner282 Ok, I understand what you mean. It's a way to keep the application open,Right?
-
iCanCode3165yWhen I was learning, this unnecessary readline always bugged me so I used to have an infinte while to keep it open. Dont know if I am the only one or other people got bugged by this too
-
guarrions195y@Codex404 You are right.Next time I should try to play with the code for myself.
Thanks for your coment : ) -
guarrions195y@iCanCode That's good to know. This was an exercise that I saw online but I didn't check it with any IDE so I don't know if it can cause the bug you are talking about.
Related Rants
I´m learning C # basic concepts and a question has come up after doing this exercise:
using System;
namespace exercise
{
class MainClass
{
public static void Main (string[] args)
{
console.WriteLine("Type your name");
String name = Console.ReadLine ();
console.WriteLine("Type one city");
String city = Console.ReadLine ();
console.WriteLine("Hello"+ name + "wellcome to " + city )
Console.ReadLine ();
}
}
}
Question: its necessary to put the last
Console.ReadLine ();?Why?
question
c#