So I have a StringBuilder variable and a string variable.
I simply want to know whether the contents of the StringBuilder and the string are equal.
However, I've been looking into how a StringBuilder works and when it is converted back into a string a duplicate copy of the contents is created.
Isn't that a problem with performance when the strings have a couple megabytes worth of characters in them?
Is there a better way to compare these two? Or is the only way to call StringBuilder.ToString() and then compare?
View Complete Post