Answers for "does c# call the program constructor"

C#
0

example of constructor in c#

class Program
{
  static void Main(string[] args)
  {
    Car Ford = new Car("Mustang", "Red", 1969);
    Car Opel = new Car("Astra", "White", 2005);

    Console.WriteLine(Ford.model);
    Console.WriteLine(Opel.model);
  }
}
Posted by: Guest on May-06-2021

C# Answers by Framework

Browse Popular Code Answers by Language