C
C#14mo ago
%Anhangüera

❔ 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
No description
6 Replies
phaseshift
phaseshift14mo ago
If thats all youre doing with it, then just use an interpolated string
x0rld 👻 🎃
x0rld 👻 🎃14mo ago
btw the commitMessage can be a const
%Anhangüera
%AnhangüeraOP14mo ago
idk, I think that would be harder in general ticketnumber and minute have some validations and variations
phaseshift
phaseshift14mo ago
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 so
%Anhangüera
%AnhangüeraOP14mo ago
hmmm, yeah, I think that makes sense :)
Accord
Accord13mo ago
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.
Want results from more Discord servers?
Add your server