I am trying to print the both the value of .First and .Last but only the value of .First()
comes up. .Last()
just prints my "Text: " word and then blank.
I'v tried chainging the i
to different values and that just makes the program worse.
case 2:
Console.Write("\n\tType a word you want to search for: ");
string sokord = Console.ReadLine();
for (int i = 0; i < loggList.Count; i++)
{
if (loggList[i].First() == sokord)
{
Console.WriteLine("\n\tTitel: " + loggList[i].First() + "\n\tText: " + loggList[i].Last());
break;
}
}
I want to get the titel from .First()
and the text from .Last()
.