运行 ❯
获取
你自己的 C#
服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
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!"); } } }
野马
阿斯特拉