Skip to main content
deleted 41 characters in body
Source Link
    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.!

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

    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.!

deleted 68 characters in body
Source Link
namespace ConsoleApplication4
{
  class Program
  {

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

namespace ConsoleApplication4
{
  class Program
  {

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

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

Fix code formatting.
Source Link
ivan.sim
  • 9.2k
  • 8
  • 49
  • 64

namespace ConsoleApplication4 { class Program {

namespace ConsoleApplication4
{
  class Program
  {

    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 I have put a debug point at the start of void main. When I press f11 continuously only the yellow arrow reaches the main function(i,e points to the two lines of code in main) and the debugging terminates. it never reaches the "getnoslessthan5" function at all.Confused.!

namespace ConsoleApplication4 { class Program {

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

namespace ConsoleApplication4
{
  class Program
  {

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

Source Link
Loading