Building a form to handle some PowerShell stuff and I’ve hit some odd behaviour with displaying multiline strings.
I’m grabbing lines from a text file with Get-Content and attempting to display them in a textbox (note that other controls and MessageBox exhibit the same behaviour) but the newlines are not being registered.
Eg, a text file containing:
Will display as:
1 2 3 a b c
Newline chars `r, `n and `r`n all correctly add a new line so yes, I can put in a foreach loop and build a new “form friendly” string but this is a very messy approach that I’m hoping won’t be necessary.
Running PowerShell 5.0 (but should be compatible with 4.0)