❔ Working with string builder
I wonder if there is a way that I can avoid passing the string to be formatted in the AppendFormat method, since I can set the value of the string in the StringBuilder class
6 Replies
If thats all youre doing with it, then just use an interpolated string
btw the commitMessage can be a const
idk, I think that would be harder in general
ticketnumber and minute have some validations and variations
append-format is doing exactly the same work as an interpolated string in terms of creating the basic string value from arguments
You could be using
return $"...";
instead of return _strBldr.AppendFormat(...).ToString();
Like, if you doht have multiple calls to builder methods, what is the point of using the builder?
But to your original question, no, I dont think sohmmm, yeah, I think that makes sense :)
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.