Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            SpecialCookieOrder oneDoz   = new SpecialCookieOrder();
            SpecialCookieOrder twoDoz   = new SpecialCookieOrder();
            SpecialCookieOrder threeDoz = new SpecialCookieOrder();

            oneDoz.OderNumber         = "101";
            oneDoz.Name               = "Arthur";
            oneDoz.CookieType         = "Chocolate Chip";
            oneDoz.SpecialDescription = "Gluten-Free";
            oneDoz.Dozens             = 1;

            twoDoz.OderNumber         = "102";
            twoDoz.Name               = "Brown";
            twoDoz.CookieType         = "Peanut Butter";
            twoDoz.SpecialDescription = "Sugar-Free";
            twoDoz.Dozens             = 2;

            threeDoz.OderNumber         = "103";
            threeDoz.Name               = "Cooper";
            threeDoz.CookieType         = "Sugar";
            threeDoz.SpecialDescription = "Iced";
            threeDoz.Dozens             = 3;

            Display(oneDoz);
            Display(twoDoz);
            Display(threeDoz);
        }
Ejemplo n.º 2
0
 public static void Display(SpecialCookieOrder order)
 {
     WriteLine("Order #{0, -6}\t{1, -15}", order.OderNumber, order.Name);
     WriteLine("\tType: {0}\t{1}", order.SpecialDescription, order.CookieType);
     WriteLine("\t{0} dozen --- ${1}", order.Dozens, order.Price);
 }