using System; namespace ConsoleApp { class A { protected static string a; public static void test() { A.a = "A::a"; Console.WriteLine(A.a + "\n"); // Prints 'A::a'. Console.WriteLine(B.a + "\n"); // Prints nothing. B.a is a separate entity from A.a (unlike in PHP - see: http://pastebin.ca/871556) } } class B:A { public static string a; } class MyApp { static void Main(string[] args) { A.test(); } } }