C# .net core bat批处理 编译运行hello world教程
- 创建项目 dotnet new
- dotnet restore
- dotnet run
dotnet new会创建一个Hello World程序。
1.新建文件夹 netcoredemo
2.创建项目 dotnet new。 —— [ 微软官网 ]
代码块
代码块语法例如:
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
String message = "";
if (args.Length < 1)
{
message = "Welcome To .Net Core";
}
else
{
foreach (string item in args)
{
message += item;
}
}
}
}
}