I’m working with a library that uses Environment.NewLine as it’s newline char when writing a file. I need it to write Unix formatted files, and as such would like to change the newline char.
Can I change the value of Environment.NewLine?
Any other ideas (aside from converting the file post creation)?
No. If you know which platform to write for, create classes for each of these platforms and let them have their own implementation. In the simplest case, this would look as follows:
etc., and then just use an instance of the appropriate class.