-6

I have predominantly been using Visual Studio as my IDE to write and run C# code. In VS ,pressing f5 or clicking helps in running the program.

I am pretty new to VS Code IDE and i've installed supporting c# extensions. I created a cs file and added below code

Console.WriteLine("Hello world"); 

I've run following command

dotnet run

on terminal to view the result and it prints as expected "hello world".

but if I change the input inside and run it does not print the given input in the .

I'd like to know ,if there are more methods to run program on VS Code and is it possible to see the results on a console window like visual studio ?

the code

hello world !

kaarthick raman
  • 793
  • 2
  • 13
  • 41
kor
  • 55
  • 5
  • 5
    It looks like you did not save the changes to Program.cs. Press Ctrl + S to save the file and run it again. – Christoph Lütjen Aug 27 '21 at 11:08
  • Does this answer your question? [Why don't other programs see the changes I made to a file in VS Code until I save those changes?](https://stackoverflow.com/questions/76984829/why-dont-other-programs-see-the-changes-i-made-to-a-file-in-vs-code-until-i-sav) – starball Aug 27 '23 at 06:12

1 Answers1

0

It looks like you have not saved the project, if the problem is not fixed I would suggest you to look at my previous answer

Techy Shadow
  • 354
  • 3
  • 13