Skip to content

Instantly share code, notes, and snippets.

@Aravin
Created April 12, 2018 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aravin/e8f37fc0b35bea2c42f7d6ebdfb9edc5 to your computer and use it in GitHub Desktop.
Save Aravin/e8f37fc0b35bea2c42f7d6ebdfb9edc5 to your computer and use it in GitHub Desktop.
Protected Internal Access Modified in C#
// 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