Created
April 19, 2012 08:18
-
-
Save marek-safar/2419594 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class A | |
{ | |
public virtual int Foo () | |
{ | |
return 4; | |
} | |
} | |
class C : A | |
{ | |
public IEnumerable<int> GetIter () | |
{ | |
yield return base.Foo (); | |
yield return base.Foo (); | |
yield return base.Foo (); | |
yield return base.Foo (); | |
yield return base.Foo (); | |
} | |
public override int Foo () | |
{ | |
throw new ApplicationException (); | |
} | |
public static void Main() | |
{ | |
foreach | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment