A trivial example of an \"infinite\" IEnumerable would be
IEnumerable Numbers() { int i=0; while(true) { yield return unchecked(i++); } } >
Yes, your code will always work without infinite looping. Someone might come along though later and mess things up. Suppose they want to do:
var q = Numbers().ToList();
Then, you're hosed! Many "aggregate" functions will kill you, like Max().
Max()