this post was submitted on 05 Apr 2025
141 points (88.1% liked)

Programmer Humor

22262 readers
622 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 3 days ago (1 children)

Maybe c# has similar. There's \r\n or \n like c++ and Environment.NewLine.

Probably it's similar in that Environment.NewLine takes into account the operating system in use and I wonder if endl in c++ does the same thing?

[โ€“] [email protected] 4 points 2 days ago

C# also has verbatim strings, in which you can just put a literal newline.

string foo = @"This string 
has a line break!";