partial 的随笔
1 partial class Dmeos 2 { 3 public int Ager { get; set; } 4 public void Run() 5 { 6 Console.WriteLine(Ager); 7 } 8 } 9 partial class Dmeos 10 { 11 public void Start() 12 { 13 Ager = 12; 14 } 15 } 16 17 }
运行
1 static void Main(string[] args) 2 { 3 4 Dmeos d = new Dmeos(); 5 d.Start(); 6 d.Run(); 7 8 }