Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created March 13, 2015 18:31
Show Gist options
  • Save jskeet/a404e6c296e5afeac27f to your computer and use it in GitHub Desktop.
Save jskeet/a404e6c296e5afeac27f to your computer and use it in GitHub Desktop.
Demo of oddity for 13.5.1
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