Question: I store 2 serialized object in 2 text file and then i read both and store it in 2 different string, and try to compare this 2 strings, the comparison failed more then one time because of the carriage return and new line difference in the end of one of the string, 
how i could compare both with ignoring spaces or carriage returns, I know I can compress the 2 strings and compare them, but is there anything like done by .net library, Like Icomparer, I'm not sure if this will work for me too.

thank you in advance 
Jp

Answer: 
A quick work around would be to replace all '\n' and '\r' character by nothing and then compare.
You can use a simple Regular Expression that can eliminate the whitespace and compare (or do what Phillippe said). But I dont think there a built-in function to do that kind of comparison.