Basically I am trying to do something like this:
image.Layers
which returns an IEnumerable for all layers except the Parent layer,
Parent
I use the following extension methods to avoid creating a useless Array:
Array
public static IEnumerable ConcatSingle(this IEnumerable enumerable, T value) { return enumerable.Concat(value.Yield()); } public static IEnumerable Yield(this T item) { yield return item; }