Using system;
namespace Pattern {/// /// Summary description for Class1 /// summary> public abstract class template {public template () {// // TODO:. Add constructor logic here //} public abstract string GetString (); public void act () {string a = getString (); system.console.writeline (A "****" a);}}
Public class temp1: template {private string a; public temp1 (String Temp) {a = TEMP;} public override string getString () {Return A;
}} // Template mode // template a = new temp1 ("kkk"); // a.act (); // a = new temp1 ("xxx"); // a.act ();