An alternative (perhaps more readable) would be:
all.Except(exceptions).Except(new int[] { otherException });
You can also create an extension method that converts any object to IEnumerable, which makes the code even more readable:
public static IEnumerable<T> ToEnumerable<T>(this T item)
{
return new T[] { item };
}
all.Except(exceptions).Except(otherException.ToEnumerable());
:
public static IEnumerable<T> Plus<T>(this IEnumerable<T> collection, T item)
{
return collection.Concat(new T[] { item });
}
all.Except(exceptions.Plus(otherException))