Skip to content

Instantly share code, notes, and snippets.

@fpopic
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save fpopic/b5068e902c215446cbc4 to your computer and use it in GitHub Desktop.

Select an option

Save fpopic/b5068e902c215446cbc4 to your computer and use it in GitHub Desktop.
using System;
namespace k
{
public class B
{
public void Test()
{
Console.WriteLine("B");
}
}
public class I : B
{
public void Test()
{
Console.WriteLine("I");
}
}
class Program
{
static void Main()
{
I i = new I();
i.Test();
((B) i).Test();
B b = i;
b.Test();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment