static void Main(string[] args) { List PingReplies = new List { new PingReply { Status = 1 }, new PingReply { Status = 1 }, new PingReply { Status = 1 }, new PingReply { Status = 8 }, new PingReply { Status = 8 }, new PingReply { Status = 8 }, new PingReply { Status = 8 }, new PingReply { Status = 8 } }; IEnumerable lastFive = PingReplies.Take(5); int num = lastFive.Where(a => a.Status != 1).Count(); //shows 2 if (lastFive.Where(a => a.Status != 1).Count() == 5) { Console.WriteLine(" may be down"); } Console.ReadLine(); } private class PingReply { public int Status { get; set; } }