Last active
November 4, 2015 03:12
-
-
Save girishso/2c6fb5af9a1ef2fe757f to your computer and use it in GitHub Desktop.
funniest code I've seen!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void processAllHiddenTags(StringBuilder sbXMLString, ASMStudent student) | |
{ | |
if (((sbXMLString.ToString().IndexOf("<w:body>") >= 0) && (sbXMLString.ToString().IndexOf("<w:body>") <= sbXMLString.Length)) && | |
((((sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9) >= 0) && | |
(((sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9) <= sbXMLString.Length))) | |
{ | |
pageText = sbXMLString.ToString().Substring(sbXMLString.ToString().IndexOf("<w:body>"), (sbXMLString.ToString().IndexOf("</w:body>") - sbXMLString.ToString().IndexOf("<w:body>")) + 9).ToString().Trim(); | |
// | |
// more madness follows! | |
// | |
} | |
} | |
// apparently the programmer didn't hear about XML parsers! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment