// Start is called before the first frame update void Start() { Print p = new PrintBanner("Hello"); p.PrintWeak(); p.PrintStrong(); }
public static void Main(string[] args) { Print p = new PrintBanner("Hello"); p.PrintWeak(); p.PrintStrong(); }
public static void AdapterMain() { IPrint p = new PrintBanner("Hello"); p.PrintWeak(); p.PrintStrong(); }
public void ClassAdapterTest() { Print <string> p = new PrintBanner("Hello"); string weak = p.PrintWeak(); string strong = p.PrintStrong(); Debug.WriteLine(weak); Debug.WriteLine(strong); Print <string> printGreeting = new PrintGreeting("山田太郎"); string weakGreeting = printGreeting.PrintWeak(); string strongGreeting = printGreeting.PrintStrong(); Debug.WriteLine(weakGreeting); Debug.WriteLine(strongGreeting); }