Last active
December 19, 2018 07:29
-
-
Save kevingosse/6f98a60283e15e3923fa50efbee042ef 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
public class Foo : BaseClass { } | |
public class Bar : BaseClass | |
{ | |
public Bar() : base() { } | |
} | |
public class BaseClass | |
{ | |
public BaseClass([CallerMemberName] string val = "Foo") | |
{ | |
Console.WriteLine(val); | |
} | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
new Foo(); // Prints Foo | |
new Bar(); // Prints .ctor | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment