Created
April 12, 2012 11:58
-
-
Save tnngo2/2366821 to your computer and use it in GitHub Desktop.
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
class Base | |
{ | |
public virtual void Method() | |
{ | |
Console.WriteLine("Base"); | |
} | |
} | |
class Derived:Base | |
{ | |
public void Method() | |
{ | |
Console.WriteLine("Derived"); | |
} | |
static void Main(string[] args) | |
{ | |
Base b = new Derived(); | |
b.Method(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment