コード例 #1
0
ファイル: Program.cs プロジェクト: GPegel/SimpleClasses
        static void Main(string[] args)
        {
            Car myNewCar = new Car();

            myNewCar.Make  = "Honda";
            myNewCar.Model = "Civic";
            myNewCar.Year  = 1998;
            myNewCar.Color = "red";

            Console.WriteLine("{0} - {1} - [2}", myNewCar.Make, myNewCar.Model, myNewCar.Color);

            Console.WriteLine("Car's value: {0:C}", myNewCar.determineMarketValue());

            Console.ReadLine();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: GPegel/SimpleClasses
        static void Main(string[] args)
        {
            Car myNewCar = new Car();

            myNewCar.Make = "Honda";
            myNewCar.Model = "Civic";
            myNewCar.Year = 1998;
            myNewCar.Color = "red";

            Console.WriteLine("{0} - {1} - [2}", myNewCar.Make, myNewCar.Model, myNewCar.Color);

            Console.WriteLine("Car's value: {0:C}", myNewCar.determineMarketValue());

            Console.ReadLine();
        }
コード例 #3
0
        static void Main(string[] args)
        {
            Car myCar = new Car();
            myCar.Make = "Slim";
            myCar.Model = "Porsche";
            myCar.Year = 2016;
            myCar.Color = "Blue";

            Console.WriteLine("{0} - {1} - {2} - {3} Color",
                myCar.Make,
                myCar.Model,
                myCar.Year,
                myCar.Color);
            Console.WriteLine("Market Value - {0:C}", myCar.determineMarketValue());
            Console.ReadLine();
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: c35573585/C_Sharp
        static void Main(string[] args)
        {
            Car myNewCar = new Car();

            myNewCar.Make = "Oldsmobile";
            myNewCar.Model = "Cutlas Superme";
            myNewCar.Year = 1986;
            myNewCar.Color = "Silver";

            Console.WriteLine("{0} - {1} - {2}",
                myNewCar.Make,
                myNewCar.Model,
                myNewCar.Color);

            //double markerValueOfCar = determineMarketValue(myNewCar);

            Console.WriteLine("Car's value: {0:C}", myNewCar.determineMarketValue());

            Console.ReadLine();
        }
コード例 #5
0
 static void Main(string[] args)
 {
     Car myNewCar = new Car();
     myNewCar.Model = "Cutlas Supreme";
     myNewCar.Color = "Blue";
     myNewCar.Year = 1990;
     myNewCar.Make = "OldsMobile";
     
     //Console.WriteLine(myNewCar.Color + "\n" + myNewCar.Model);
     Console.WriteLine("{0} - {1} - {2} - {3}",
                         myNewCar.Make,
                         myNewCar.Model,
                         myNewCar.Year,
                         myNewCar.Color);
     
     //double marketValueOfCar = determineMarketValue(myNewCar);
    
     Console.WriteLine("Car's Value: {0:C}", myNewCar.determineMarketValue());
     
     Console.Read();
 }