I am trying to check if a array list contains a string that starts with “apple”.
Is it possible that if it exist will show the data that start with “apple”?
foreach (var reminder1 in reminderSplit)
{
MessageBox.Show(reminder1);
if (reminder1.StartsWith("apple"))
{
string home = reminder1.StartsWith("apple").ToString();
MessageBox.Show("Have : " + home);
}
}
Yes, of course:
Alternatively, if you wish to exclude “apple”, then you can replace the display code with the following: