using System;
using System.Collections.Generic;
using System.Linq;
namespace filterInlistusingAnotherList
{
class Program
{
public static void Main(string[] args)
{
List<string> City1 = new List<string> { "Agra", "Noida" };
List<string> City2 = new List<string> { "Delhi","Agra", "Noida", "Ghaziabad" };
City2.Where(x => City1.Count(y => x.Contains(y)) == 0).ToList<string>().ForEach(x => Console.WriteLine(x));
Console.ReadKey();
}
}
}In this Code Snippet, I will be going to explain the example of apply Filter in List by Another List.
