convert string array to string

后端 未结 9 2185
野性不改
野性不改 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:30

    I used this way to make my project faster:

    RichTextBox rcbCatalyst = new RichTextBox()
    {
        Lines = arrayString
    };
    string text = rcbCatalyst.Text;
    rcbCatalyst.Dispose();
    
    return text;
    

    RichTextBox.Text will automatically convert your array to a multiline string!

提交回复
热议问题