예제 #1
0
        static void Main(string[] args)
        {
            string str = "";
            SeveralComponents components = new SeveralComponents("RAM-Card", "DDR3", 59.99m);
            SeveralComponents components2 = new SeveralComponents("CPU", "GIGABYTE", 169.99m);
            str = components.ToString() + components2.ToString().Trim();
            Computer computer = new Computer("Lenovo", str, 229.98m);

            Console.WriteLine(computer.ToString());
        }
예제 #2
0
        static void Main(string[] args)
        {
            string            str         = "";
            SeveralComponents components  = new SeveralComponents("RAM-Card", "DDR3", 59.99m);
            SeveralComponents components2 = new SeveralComponents("CPU", "GIGABYTE", 169.99m);

            str = components.ToString() + components2.ToString().Trim();
            Computer computer = new Computer("Lenovo", str, 229.98m);

            Console.WriteLine(computer.ToString());
        }