예제 #1
0
        static void Main(string[] args)
        {
            Wine w1 = new Wine("Charles Shaw Merlot");
            Wine w2 = new Wine("Mark Ryan Dissident", 2004);
            Wine w3 = new Wine("Dom Perignon", 1994, 120.00m);

            Console.WriteLine("{0}", w1.Name);
            Console.WriteLine("{0} {1}", w2.Year, w2.Name);
            Console.WriteLine("{0} {1} {2}", w3.Year, w3.Name, w3.price);

            Console.ReadLine();
        }
예제 #2
0
            static void Main(string[] args)
            {
                Wine wine_1 = new Wine("Pinot noir");
                Wine wine_2 = new Wine(2004, "Sauvignon blanc");
                Wine wine_3 = new Wine(1994, "Cabernet sauvignon", 250.00);

                Console.WriteLine("Your wine is {0}", wine_1.name);
                Console.WriteLine("The wine made in the year {0} is from the French and is known as {1}", wine_2.year, wine_2.name);
                Console.WriteLine("In the year {0}, a wine by the name {1} costed {2:C}", wine_3.year, wine_3.name, wine_3.price);

                Console.ReadLine();
            }
예제 #3
0
파일: Program.cs 프로젝트: niuniuliu/CSharp
        static void Main(string[] args)
        {
            Wine w1 = new Wine("Charles Shaw Merlot");
            Wine w2 = new Wine("Mark Ryan Dissident", 2004);
            Wine w3 = new Wine("Dom Perignon", 120.00m, 1994);

            Console.WriteLine("{0}", w1.Name);
            Console.WriteLine("{0} {1}", w2.Year, w2.Name);
            Console.WriteLine("{0} {1} {2}", w3.Year, w3.Name, w3.price);

            Console.ReadLine();
        }