Created
April 12, 2018 18:44
-
-
Save Aravin/e8f37fc0b35bea2c42f7d6ebdfb9edc5 to your computer and use it in GitHub Desktop.
Protected Internal Access Modified in C#
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
// Code from Project 1 | |
namespace FirstAssembly | |
{ | |
public class FirstClass | |
{ | |
protected internal static void FirstMethod() | |
{ | |
Console.WriteLine("Private protected method called..."); | |
} | |
} | |
} | |
// Code from Project 2 | |
using FirstAssembly; | |
namespace SecondAssembly | |
{ | |
public class SecondClass : FirstClass | |
{ | |
public static void SecondMethod() | |
{ | |
FirstMethod(); // Method will be accessible | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment