Created
March 13, 2015 18:31
-
-
Save jskeet/a404e6c296e5afeac27f to your computer and use it in GitHub Desktop.
Demo of oddity for 13.5.1
This file contains 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; | |
public class Base | |
{ | |
public void Foo() | |
{ | |
Console.WriteLine("Foo"); | |
} | |
} | |
public class Child : Base | |
{ | |
// This is fine | |
// public new int Foo = 10; | |
// This isn't, even though it can't be invoked in Test anyway. | |
public new event Action Foo; | |
} | |
class Test | |
{ | |
static void Main(string[] args) | |
{ | |
new Child().Foo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment