Paint.CarPaint.GetMaterial C# (CSharp) Méthode

GetMaterial() public méthode

public GetMaterial ( ) : string
Résultat string
        public string GetMaterial()
        {
            return Conficius.GiveMeAnInternalAnswer("Material");
        }
    }

Usage Example

Exemple #1
0
        static void Main(string[] args)
        {
            var motor = new CarMotor();
            
            //Wheels are overwridden by application
            var wheel1 = new CarWheel();
            var wheel2 = new CarWheel();
            var wheel3 = new CarWheel();
            var wheel4 = new CarWheel();
            
            var paint = new CarPaint();

            Console.WriteLine("Your car consists of:");
            Console.WriteLine("     Motor: " + motor.GetMaterial());
            Console.WriteLine("  1. Wheel: " + wheel1.GetMaterial());
            Console.WriteLine("  2. Wheel: " + wheel2.GetMaterial());
            Console.WriteLine("  3. Wheel: " + wheel3.GetMaterial());
            Console.WriteLine("  4. Wheel: " + wheel4.GetMaterial());
            Console.WriteLine("     Paint: " + paint.GetMaterial());

            Console.ReadLine();
        }