public class Student { string id = "1"; string name = "Lily"; internal string Id{ get { return id; } }
internal string Name{ get{ return name; }
} }
之后我在cmd里面编译成dll文件
Mainclass.cs
using System; public class Mainclass { public static void Main(){ Baseclass.F(); Baseclass.print(); Student student = new Student(); Console.WriteLine(student.Id,student.Name); } }