Run ❯
×
Change Orientation
Change Theme, Dark/Light
using System; namespace MyApplication { class Car { public string model; public string color; public int year; // Create a class constructor with multiple parameters public Car(string modelName, string modelColor, int modelYear) { model = modelName; color = modelColor; year = modelYear; } static void Main(string[] args) { Car Ford = new Car("Mustang", "Red", 1969); Console.WriteLine(Ford.color + " " + Ford.year + " " + Ford.model); } } }
Red 1969 Mustang