Run ❯
Get your
own C#
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
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