Reputation: 3672
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