Maybe I don't know all the c# quirks, but the code below should be compiling, but it does. See the bolded code at the bottom.
using System;
namespace ConsoleApplication19
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Child child = new Child();
Console.WriteLine(child.SomeVariable.ToStrin g());
}
}
public class MyBase
{
public int SomeVariable;
}
public class Child : MyBase
{
public Child()
{
base.SomeVariable = 1;
// why in the world does this compile???
// note the space between the base and .SomeVariable
base .SomeVariable = 2;
}
}
}