Difference between \n \r \r\n and System.Environment.NewLine

I found some bug during trying to compare 2 text strings.

after investigation on issue I got the cause of problem that is occurred from differential new line character.

What is difference between new line string?

* \n (\u000A) for Unix

* \r (\u000D) for Mac

* \r\n (\u000D\u000A) for Windows

* System.Environment.NewLine depends on language as the escape characters ‘\r’ and ‘\n’ in Microsoft C# and C/C++.