I am trying to print new lines in a list box on a Windows form, but / n or / r / n does not work for printing on different lines. All this prints as one element.
Windows.NET standard form lists do not support multiple items.
To get what you described, you either use a different control or configure the ListBox to work in different ways.
look at this link: Editable multi-line list for .NET for an example
, , Owner Drawn: Drawn Controls - ListBox
Regex.Split :
foreach (string s in Regex.Split(TheStringContainigTheNewLines, "\n")) lbMyListBox.Items.Add(s);