Skip to content

Instantly share code, notes, and snippets.

@danpadmore
Created February 27, 2018 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danpadmore/60d9665915ee38fea08091cd9645cc3e to your computer and use it in GitHub Desktop.
Save danpadmore/60d9665915ee38fea08091cd9645cc3e to your computer and use it in GitHub Desktop.
Will the manager be alerted?
using System;
using System.Collections.Generic;
using System.Linq;
class Review
{
public int Score { get; set; }
}
class Program
{
static void Main(string[] args)
{
var reviews = new List<Review>();
if (reviews.All(r => r.Score < 0))
throw new Exception("Alert manager");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment