Skip to content

Instantly share code, notes, and snippets.

@yanisurbis
Created August 4, 2015 14:58
Show Gist options
  • Save yanisurbis/50f0a2f5dd3dc36dfcc8 to your computer and use it in GitHub Desktop.
Save yanisurbis/50f0a2f5dd3dc36dfcc8 to your computer and use it in GitHub Desktop.
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
B b = new C();
b.hi();
Console.ReadLine();
}
}
class A
{
virtual public void hi()
{ Console.WriteLine("hiA"); }
}
abstract class B : A
{
override public abstract void hi();
}
class C : B
{
override public void hi()
{ Console.WriteLine("hiC"); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment