Skip to content

Instantly share code, notes, and snippets.

@chrisforbes
Created November 30, 2009 07:05
Show Gist options
  • Save chrisforbes/245301 to your computer and use it in GitHub Desktop.
Save chrisforbes/245301 to your computer and use it in GitHub Desktop.
namespace ExceptIsInteresting
{
class Program
{
static void Main(string[] args)
{
var xs = new[] { "a", "a", "b" };
var ys = new[] { "b" };
var result = xs.Except(ys);
Console.WriteLine(string.Join( ", ", result.ToArray() ));
// you'd expect the output to be `a, a`
// but you actually get `a`.
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment