示例#1
0
        public Program()
        {
            Ace ace = new Ace();

            ace.SetName("Cary Grant");

            AceToAcmeAdapter acmeAdapter = new AceToAcmeAdapter(ace);

            Console.WriteLine("First Name : {0}", acmeAdapter.GetFirstName());
            Console.WriteLine("Last Name : {0}", acmeAdapter.GetLastName());
        }
示例#2
0
 public void SetFirstName(string firstName)
 {
     this.firstName = firstName;
     ace.SetName(firstName + " " + lastName);
 }