C Sharp (C#) - Inheritance
What will happen if you try to access a protected member from an unrelated class?
class A {
protected int number = 5;
}
class B {
void Test() {
A a = new A();
System.Console.WriteLine(a.number);
}
}