Run »
prog.cs
prog2.cs
using System; namespace MyApplication { class Program { static void Main(string[] args) { Car Ford = new Car(); Ford.model = "Mustang"; Ford.color = "red"; Ford.year = 1969; Car Opel = new Car(); Opel.model = "Astra"; Opel.color = "white"; Opel.year = 2005; Console.WriteLine(Ford.model); Console.WriteLine(Opel.model); } } }
using System; namespace MyApplication { class Car { public string model; public string color; public int year; public void fullThrottle() { Console.WriteLine("The car is going as fast as it can!"); } } }
Mustang
Astra