How many times the loop will continue?

var intList = new List<int>() { 1 };
foreach(var i in intList)
{
Console.WriteLine(i);
intList = new List<int>() { 1,2 };
}

 Posted by Rajnilari2015 on 8/17/2016 | Category: C# Interview questions | Views: 582 | Points: 40
Select from following answers:
  1. 0
  2. 1
  3. 2
  4. 3
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response