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

Programmer Humor

22250 readers
802 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 2 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 1 day ago

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

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