2012-04-07 169 views
0

下面的代码产生一个错误,说我的输入字符串格式不正确。为什么?输入字符串格式不正确

private void button7_Click(object sender, EventArgs e) 
{ 
    string uriAddTagtoGroup = 
     string.Format("http://localhost:8000/Service/AddTagtoGroup/{group}/{tag}", 
        textBox6.Text, textBox7.Text); 
    //line above says input string was not in the correct format? 
} 

回答

5
string.Format("http://localhost:8000/Service/AddTagtoGroup/{0}/{1}", 
       textBox6.Text, textBox7.Text); 

使用序

+1

这奏效了!谢谢。 – 2012-04-07 15:54:08