sometimes when I open some file, the Visual Studio shows me a dialog about inconsistent line endings but Visual Studio is able to normalize the line endings.
How can I normalize the line endings (Windows CR LF) in the file by myself with using C#?
I read a definition of stored procedure from SQL Server and save it to the file.
File.WriteAllText("procedure.sql", "content");
But when I open the file in Visual Studio it gives a warning about inconsistent line endings. SQL Server Management Studio also shows the same warnings when I want to modify the stored procedure.