0

I'm trying to run a simple Hello World code in VSC(mac os)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Test");
        Console.ReadLine();
    }
}

Then i got

[Running] scriptcs -script "/Users/Username/Desktop/csharpstudy/test.cs"

[Done] exited with code=0 in 1.808 seconds

Any help please!

pedro lee
  • 9
  • 2
  • 1
    Does this answer your question? [Why doesn't Console.WriteLine work in Visual Studio Code?](https://stackoverflow.com/questions/43237146/why-doesnt-console-writeline-work-in-visual-studio-code) – orhtej2 May 18 '22 at 12:55
  • Have you turned on the external console as described here? https://stackoverflow.com/questions/43237146/why-doesnt-console-writeline-work-in-visual-studio-code – stephen.vakil May 18 '22 at 13:01

1 Answers1

0

Add a ReadLine too:

static void Main(string[] args)
    {
        Console.WriteLine("Test");
        Console.ReadLine();
    }
apomene
  • 14,282
  • 9
  • 46
  • 72