79357809

Date: 2025-01-15 10:22:22
Score: 1
Natty:
Report link

At the cost of a slight performance hit and some extra memory usage, you could go for something like

errorBuilder.Append($"{"Duplicated ID"},{"Invalid cost"},{"Unsupported Service for account"}");

in the interpolated string ($"") you can insert any variables with {} more info on performance and memory usage:

https://blog.ladeak.net/posts/string-interpolation-stringbuilder#:~:text=StringBuilder%20is%20used%20to%20append,the%20appended%20string%20to%20Builder.

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Stijn De Cat