- 1 internal class Program
- 2 {
- 3 private static void Main(string[] args)
- 4 {
- 5 XiaoMing xm = new XiaoMing();
- 6 xm.Study(new CSharp());
- 7 }
- 8 }
- 9
- 10 internal class CSharp
- 11 {
- 12 public void ShowMsg()
- 13 {
- 14 Console.WriteLine("《深入理解C#》");
- 15 }
- 16 }
- 17
- 18 internal class XiaoMing
- 19 {
- 20 public void Study(CSharp cSharp)
- 21 {
- 22 cSharp.ShowMsg();
- 23 }
- 24 }