void Main() { Facade facade = new Facade(); facade.Show(); } class Facade{ ProductA pa = new ProductA(); ProductB pb = new ProductB(); public void Show(){ pa.ShowA(); pb.ShowB(); } } class ProductA{ public void ShowA(){} } class ProductB{ public void ShowB(){} }
时间: 2024-10-27 10:42:49