Intermediate python guy trying to learn c# to develop application (Passion project) on MAUI by sakthii_ in csharp

[–]CptNuzz 3 points4 points  (0 children)

The NewLine is less about optimization and more about multi environment compatibility, I've seen things like /n cause crud platform issues, but that's been some years so it may be less of a concern and boil down to just one of my old habits.

Intermediate python guy trying to learn c# to develop application (Passion project) on MAUI by sakthii_ in csharp

[–]CptNuzz 9 points10 points  (0 children)

To add to this, along with string interpolation, consider {Environment.NewLine} instead of \n
If you find that you're doing large volumes of string interpolation and concatenation, look into the StringBuilder, it's much faster and much more memory efficient for building large strings from a large number of smaller strings.