using System.Collections.Generic;
namespace ConsoleApplication1
public int ID { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public static void Main(string[] args)
List<Student> students = new List<Student>();
students.Add(new Student { ID = 1, Name = "Kapil", Age = 22 });
students.Add(new Student { ID = 2, Name = "Ramesh", Age = 17 });
students.Add(new Student { ID = 3, Name = "Raj", Age = 24 });
students.Add(new Student { ID = 4, Name = "Anil", Age = 25 });
if (students.Any(w => w.Age < 18))
Console.WriteLine("There are minor students in list.");
Console.WriteLine("No minor students");