I have no idea what I am doing because I spent too much time on Java
namespace Retail_Price_Calculator
{
public partial class Form1 : Form
{
double retailPrice;
public Form1()
{
InitializeComponent();
}
private double CalculateRetail(double pCost, double pPercent)
{
return retailPrice = pCost + (pCost * pPercent);
}
private void calculateButton_Click(object sender, EventArgs e)
{
CalculateRetail(wholesaleCostTextBox.Text, markupPercentageTextBox.Text);
retailPrice.ToString("c");
displayPriceLabel.Text = "Retail Price: " + retailPrice;
}
}
}```