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 only, the yellow arrow reachescovers only the main function(i,e points to the two lines of code in main) block and the debugging terminates. it never reaches the "getnoslessthan5" function at all.Confused.!