26

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?

I feel like quite a moron right now, but I'll leave the question up here just for laughs. It's been a long day...

2 Answers 2

39

It comes with a NewLine property for just that.

0
4

Just call .write and add the line break at the end?

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.