What will be the output of the below code segment?

class Program
{
static void Main(string[] args)
{
new List<string>() { "apple", "tomato", "grapes", "potato" }
.Union(new List<string>() { "apple", "mango", "grapes", "sky" })
.ToList()
.ForEach(i => Console.Write(i+" "));

Console.ReadKey(true);
}
}

 Posted by Rajnilari2015 on 10/24/2015 | Category: C# Interview questions | Views: 3017 | Points: 40
Select from following answers:
  1. apple tomato grapes potato mango sky
  2. apple tomato grapes potato apple mango grapes sky
  3. tomato potato mango sky
  4. apple grapes mango sky
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response