I want to display strings in a file that begins with the letter "F" (var target = "F";) and then print it in footlockerExistingBlogTextBox however only display 5 strings/lines. The file that holds the array contains more that 5 strings that begin with "F" and so I only want to display the last 5 latest entries. Thanks for your help in advance. Much appreciated.
Below displays my code:
var target = "F";
var results = footlockerArray.Where(r => r.StartsWith(target)).Reverse();
foreach (string result in results)
{
footlockerExistingBlogTextBox.Text += result;
}
for (int i = footlockerArray.Length - 1; i > footlockerArray.Length - 5; i--)
{
footlockerArray.Reverse();
footlockerExistingBlogTextBox.Text += footlockerArray[i];
}