选了C#课,自学的笔记,写了一些又删了,还是直接看官方教程吧,中文的
另外,想从安装SDK开始的话…
1.建立应用程序:
dotnet new console -o myApp
cd myApp
主文件是Program.cs
2.运行
dotnet run
Hello World!
附:C#类
一般都会在不同的文本文件中定义每个类,比如新建一个Student.cs文件定义Student类
using System;
namespace classes
{
public class Student
{
public string Name { get; set; }
public string Id { get; }
public Student(string name, string id)
{
this.Name = name;
this.Id = id;
}
}
}
项目结构