我想帶給型1製備的變量(金額和利率)爲表3 我需要把表格1製作成標籤中的變量形式3或得到變量形式1到形式3.是否有任何方式將變量從一種形式傳遞到另一種形式,以及如何?帶來變量從一種形式到另
namespace InvestmentCalc
{
public partial class Form1 : Form
{
decimal Amount;
decimal WeekInterest;
decimal TwoWeekInterest;
decimal MonthInterest;
decimal ThreeMonthInterest;
public Form1()
{
InitializeComponent();
}
private void nextButton_Click(object sender, EventArgs e)
{
ParseItems();
Formchange();
}
private void ExitButton_Click(object sender, EventArgs e)
{
this.Close();
}
private void ClearButton_Click(object sender, EventArgs e)
{
}
//Methods
public void ParseItems()
{
WeekInterest = decimal.Parse(WeekIntTextBox.Text);
TwoWeekInterest = decimal.Parse(tWeekIntTextBox.Text);
MonthInterest = decimal.Parse(monthIntTextBox.Text);
ThreeMonthInterest = decimal.Parse(threeMonthIntTextBox.Text);
Amount = decimal.Parse(DepositTextBox1.Text);
}
public void Formchange()
{
Form3 Check = new Form3();
Check.Show();
Hide();
}
}