public static IEnumerable<T> SkipEnd<T>(this IEnumerable<T> enumerable, int count) {
T[] cache = new T[count];
var ie = enumerable.GetEnumerator();
for (int i = 0; i < count; ++i) {
if (!ie.MoveNext()) {
yield break;
}
cache[i] = ie.Current;
}
int index = 0;
while (ie.MoveNext()) {
yield return cache[index];
cache[index] = ie.Current;
if (++index >= count) {
index = 0;
}
}
}
cHVibGljIHN0YXRpYyBJRW51bWVyYWJsZTxUPiBTa2lwRW5kPFQ+KHRoaXMgSUVudW1lcmFibGU8VD4gZW51bWVyYWJsZSwgaW50IGNvdW50KSB7CglUW10gY2FjaGUgPSBuZXcgVFtjb3VudF07Cgl2YXIgaWUgPSBlbnVtZXJhYmxlLkdldEVudW1lcmF0b3IoKTsKCWZvciAoaW50IGkgPSAwOyBpIDwgY291bnQ7ICsraSkgewoJCWlmICghaWUuTW92ZU5leHQoKSkgewoJCQl5aWVsZCBicmVhazsKCQl9CgkJY2FjaGVbaV0gPSBpZS5DdXJyZW50OwoJfQoJaW50IGluZGV4ID0gMDsKCXdoaWxlIChpZS5Nb3ZlTmV4dCgpKSB7CgkJeWllbGQgcmV0dXJuIGNhY2hlW2luZGV4XTsKCQljYWNoZVtpbmRleF0gPSBpZS5DdXJyZW50OwoJCWlmICgrK2luZGV4ID49IGNvdW50KSB7CgkJCWluZGV4ID0gMDsKCQl9Cgl9Cn0=
prog.cs(1,30): error CS0116: A namespace can only contain types and namespace declarations
Compilation failed: 1 error(s), 0 warnings