所以我在文本框分配时出现这个错误,但我不明白为什么任何人都可以给我一个关于怎么做的建议?使用未分配的本地变量(字符串)错误
private void button2_Click(object sender, EventArgs e)
{
int n = Convert.ToInt32(textBox16.Text);
int t = Convert.ToInt32(textBox17.Text);
matrix.CalculeazaQR(n, t);
string temp;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
temp = matrix.q[i, j].ToString("0.00");
if (j % (n - 1) == 0)
temp += "\n";
temp += ",";
}
}
textBox3.Text = temp;
}
谢谢你,它的工作。 – 2013-03-26 11:31:49
@ guNNer2bad,欢迎您访问http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – Habib 2013-03-26 11:34:11