user3163495
user3163495

Reputation: 3672

Does string interpolation StringBuilder internally?

Note: this is not a duplicate of the question here. That one asks about string concatenation, which is different from string interpolation.

Consider this example of string creation in C#:

var str = $"{a}{b}{c}";

Internally at run time, will it utilize a StringBuilder? Like this:

StringBuilder sb = new();
sb.Append(a);
sb.Append(b);
sb.Append(c);
var str = sb.ToString();

Upvotes: 0

Views: 65

Answers (0)

Related Questions