Skip to content

Instantly share code, notes, and snippets.

@marek-safar
Created April 19, 2012 08:18
Show Gist options
  • Save marek-safar/2419594 to your computer and use it in GitHub Desktop.
Save marek-safar/2419594 to your computer and use it in GitHub Desktop.
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