Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Speed is not the reason of the necessity to use StringBuilder, it is a consequence.
When you concat 2 string, the system need to create a new array for the new string and copy all the bytes
So, your program will take twice the memory for the operation and copy again and again all the bytes to the new string.
StringBuilder use a bigger array and increased it's size when the limit is reach (like 2,4,8,16,32, ... x2 each times).
Each Append() copy only the bytes of the given string and do array resize time to times when size limit is reached, not each time.
I didn't know ternary operators can be used in such ways! Mind. Blown.
Sheesh