c# compile code,

ok when you run code from the IDE and its a console app, how come the second its finished it closes the console, can i change it so the console stays open untill i close it?