this post was submitted on 05 Apr 2025
140 points (88.5% liked)

Programmer Humor

22274 readers
1852 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
[โ€“] r00ty@kbin.life 3 points 4 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?

[โ€“] vithigar@lemmy.ca 4 points 3 days ago

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

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