convert string array to string

后端 未结 9 2190
野性不改
野性不改 2020-12-02 10:59

I would like to convert a string array to a single string.

string[] test = new string[2];
test[0] = \"Hello \";
test[1] = \"World!\";

I wou

9条回答
  •  忘掉有多难
    2020-12-02 11:22

    Like this:

    string str= test[0]+test[1];
    

    You can also use a loop:

    for(int i=0; i<2; i++)
        str += test[i];
    

提交回复
热议问题