Last active
July 7, 2022 05:17
-
-
Save guitarrapc/2e89e08ea50ad456b54b016d50c74013 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
void Main() | |
{ | |
new Foo().Run(); // Foo.M | |
} | |
public class Foo | |
{ | |
public void Run() { new Bar().M2(); } | |
private static void M() { Console.WriteLine("Foo.M"); } | |
private class Bar | |
{ | |
public void M2() | |
{ | |
// Can access prarent class's private member. | |
M(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment