.nettextstreamwriter

StreamWriter end line with Lf rather than CrLf


I'm using StreamWriter to output a text file, but I would like to end my WriteLine with Lf rather than the default CrLf. Is there an easy way to do this using a parameter built into StreamWriter?


Solution

  • It comes with a NewLine property for just that.