嗨,我是全新的,所以不要对我的菜鸟问题做出严厉的判断,
namespace Oef5_3_ShowIncome
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Button_Click(object sender, EventArgs e)
{
int YearSalary = Convert.ToInt32(YearSalaryTextBox.Text);
int numberOfYears = Convert.ToInt32(numberOfYearsTextBox.Text);
ShowIncome(YearSalary, numberOfYears);
MessageBox.Show("something something ", Convert.ToString(ShowIncome)));
}
private int ShowIncome(int lalala, int dadada)
{
int results = lalala * dadada;
return results;
}
}
}
在... MessageBox.Show("某事" Convert.ToString(ShowIncome))); 我收到以下错误:windows.form.messagebox.show(string, string) 的最佳重载方法匹配有一些无效参数。