我试图在label1上显示货币汇率,但我不知道应该在label1.Text =中键入什么。所以有谁能指引我
String[] arr = new string[2];
arr[0] = "US"
arr[1] = "SG"
Combobox1.Items.AddRange(arr);
Combobox2.Items.AddRange(arr);在combobox1和combobox2中
double[,] value = new double [2,2];
for(int I =0; I<2; I++)
{
value[0,0] = 1; // basically if I chose Combobox1 US and Combobox2 US the rate is 1;
value[0,1] = 1.24; // US to SG
value[1,0] = 0.80; // SG to US
value[1,1] = 1; // SG to SG
Label1.Text =
}发布于 2013-07-22 23:18:24
你在找这样的东西吗?
double[,] value = new double[,] { { 1, 1.24 }, { 0.8, 1 } };
Label1.Text = value[Combobox1.SelectedIndex, Combobox2.SelectedIndex].ToString();https://stackoverflow.com/questions/17791119
复制相似问题