Created
November 30, 2009 07:05
-
-
Save chrisforbes/245301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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