static void Main(string[] args)
{
List<int> li = new List<int>() { 1, 20, 30, 4, 5 };
GetNosLessThan5(li);
}
public static IEnumerable<int> GetNosLessThan5(List<int> numbers)
{
foreach (var v in numbers)
{
if (v < 5)
yield return v;
}
}
I have put a debug point at the start of void main. When I press f11 continuously, the yellow arrow covers only the main function block and the debugging terminates. it never reaches the "getnoslessthan5" function at all.Confused.!