Console.Write in .Net Core

后端 未结 3 450
挽巷
挽巷 2021-01-08 01:22

I start to learn .Net Core. I want to write a simple \'Hello World\' console application.

Unfortunately the System.Console is not available initially. T

3条回答
  •  鱼传尺愫
    2021-01-08 01:59

    Just add NuGet Package

    System.Console

    to your project. No need to muss around with project.json. That way, you also get the latest (stable) version.

    One gotcha: if you name your console project Something.Console, be sure to fully qualify the path to Write, i.e.

    System.Console.Write();

提交回复
热议问题