I have problems with spreads here. In principle, the user places some data in a text field, which is then stored directly in the database.
When I show the data in my program, I only want to display the first line of the text field, so I tried
Regex newLine = new Regex("/[\r\n]+/");
String[] lines = newLine.Split(row[data.textColumn.ColumnName].ToString());
SomeLabel.Text = lines[0];
But it displays me all the lines after another, so if the user puts
a
b
c
The label displays
abc
How can I make this work so that it only displays the first line?
source
share