How can i get the last line in a textbox by clicking a button. With that code i get the first line …
private void btnProbe_Click(object sender, EventArgs e)
{
string[] first = txtRec.Text.Split(new char[] { '\n' }[0]);
probe.Text = txtRec.Lines[0];
}
You don’t need to split the string, just use: