Except Prototype : Except « LINQ « C# / C Sharp






Except Prototype

 

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

public class MainClass {
    public static void Main() {
        string[] presidents = {"G", "H", "a", "H", "over", "Jack"};
        IEnumerable<string> processed = presidents.Take(4);
        IEnumerable<string> exceptions = presidents.Except(processed);
        foreach (string name in exceptions)
            Console.WriteLine(name);
    }
}

 








Related examples in the same category

1.One array expect another array
2.Use Except to print numbers that are in one integer array, but not another
3.Use Except to print the first character of product names that aren't also the first character of customer names.