Exemplo n.º 1
0
 public void CreateThreeInstanceThenDesplay()
 {
     AbstractDisplay aDisp1 = new CharDisplay ('H');
     AbstractDisplay aDisp2 = new StringDisplay ("Hello, CSharp!");
     AbstractDisplay aDisp3 = new StringDisplay ("Hello, Template Method.");
     aDisp1.Display ();
     aDisp2.Display ();
     aDisp3.Display ();
 }
Exemplo n.º 2
0
 public void InitializeWithCharacterThenDisplay()
 {
     AbstractDisplay aDisp = new CharDisplay ('H');
     aDisp.Display ();
 }