Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
Car.cs
Program.cs
 

using System;

namespace MyApplication
{
  class Car
  {
    public string model;
    public string color;
    public int year;
    
    public Car(string modelName, string modelColor, int modelYear)
    {
      model = modelName;
      color = modelColor;
      year = modelYear;
    }  
  }
}

Result:
Mustang
Astra