Answers for "c# error CS7036"

C#
0

c# error CS7036

/*
  error CS7036: There is no argument given that corresponds to the
  required formal parameter 'speed' of 'Vehicle.Vehicle(double)' 
    																*/

// Created a Constructor in superclass Vehicle
public Vehicle( double speed )
    {
      Speed = speed;
      LicensePlate = Tools.GenerateLicensePlate();
    }

//Original Constructor
class Sedan
  {
    public Sedan(double speed)
    {
      Speed = speed;
      LicensePlate = Tools.GenerateLicensePlate();
      Wheels = 4;
    }

// Remove 'Speed' and 'LicensePlate' from Sedan Constructor
// Add 'class Sedan : Vehicle '
// Add 'public Sedan(double speed) : base(speed)'
  
//New Constructor
class Sedan : Vehicle
  {
    public Sedan(double speed) : base(speed)
    {
      Wheels = 4;
    }
  }
Posted by: Guest on March-05-2020

Code answers related to "c# error CS7036"

C# Answers by Framework

Browse Popular Code Answers by Language