Created
January 20, 2014 22:42
-
-
Save VladimirReshetnikov/8530850 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; | |
class Base | |
{ | |
private string x = "x".Print(); | |
} | |
class Derived : Base | |
{ | |
private string y = "y".Print(); | |
private string z; | |
public Derived() | |
{ | |
this.z = "z".Print(); | |
} | |
} | |
static class Program | |
{ | |
static void Main() | |
{ | |
new Derived(); // y x z | |
} | |
public static string Print(this string s) | |
{ | |
Console.WriteLine(s); | |
return s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment