Why is my method X below not called ?!
static class Program { private static void Main() { X((IEnumerable<int>)null); } public static IEnumerable<T> X<T>(IEnumerable<T> e) { if (e == null) throw new ArgumentNullException(); yield break; } }
I tried to enter the debugger, but it does not enter X ! Is the yield break keyword causing a side effect that I don't know about?
If it's worth it, I'm using Visual Studio 2008 Express with .NET 3.5 SP1.
source share