📜  c# 记录 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:06.184000             🧑  作者: Mango

代码示例2
public record Teacher : Person
{
    public string Subject { get; }

    public Teacher(string first, string last, string sub)
        : base(first, last) => Subject = sub;
}