Question
I cannot find out what is wrong with this code This is all in c#, I need to have 5 properties to the car, then
I cannot find out what is wrong with this code This is all in c#, I need to have 5 properties to the car, then when i click the button i need the properties to show up as "The car model is: Challenger, The car make is: Dodge, The car Year is: 2019, the car miles per gallon is: 38, The car horsepower is: 300.
Also need to the message to show up in the text box that I have, and need to be able to hide said text box when i click the hide button. This is in Visual Studio for c#!
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;
namespace MilestoneInventoryListOfCars { public partial class Form1 : Form { private int carModel; private int carMake;
public int Challenger { get; private set; }
public Form1() { InitializeComponent(); }
private void btnShow_Click(object sender, EventArgs e) { carModel = Challenger; int Dodge = carMake; double carYear; double carMilesPerGallon; double carHorsePower; carYear = 2019; carMilesPerGallon = 38; carHorsePower = 300; MessageBox.Show("The car model is " + carModel + " " + carMake + " " + carYear + " " + carMilesPerGallon + " " + carHorsePower); }
private void hideBtn_Click(object sender, EventArgs e) { }
private void closeBtn_Click(object sender, EventArgs e) { this.Close(); } } }
Form 1 Show Inventory list Hide Inventory List Close ApplicationStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started