Hello,
I receive around 5 messages per second. Each of them has a string, which I concatenate to a master string that contains all the received messages
string _masterText = "";
public void AddNewMessage(string text) // this is going to be call at least 5 times/second
{
_masterText += text;
}
Is this the appropiated way to do it? or should I use instead StringBuilder, like:
StringBuilder _masterText = new StringBuilder();
public void AddNewMessage(string text) // this is going to be call at least 5 times/second
{
_masterText.Append(text);
}
Thanks