This post was originally published on this site
The Daily WTF
Honestly, I don’t know what to say about this code sent to us by Austin, beyond “I think somebody was very confused”.
string text; text = “”; // snip box.Text = text; text = “”; text = XMLUtil.SanitizeXmlString(text);
This feels like it goes beyond the usual cruft and confusion that comes with code evolving without ever really being thought about, and ends up in some space outside of meaning. It’s all empty strings, signifying nothing, but we’ve sanitized it.
[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.
To read the full article click on the 'post' link at the top.