可能重複:
What's the best string concatenation method using C#?C#添加字符串到另一個字符串
我有一個變量:
string variable1;
我試圖做這樣的事情:
for (int i = 0; i < 299; i += 2)
{
variable1 = variable1 && IntToHex(buffer[i]);
}
IntToHex是一個字符串函數,因此「IntToHex(buffer [i])」的結果將是字符串。但它出現了一個錯誤,說我不能使用& &。有沒有解決方案將字符串添加到另一個字符串?謝謝!
[string concatenation](http://msdn.microsoft.com/en-us/library/ms228504.aspx) – Habib