I'm trying to access a function in the form of my Windows Forms app from a child class file, and it gives the error
'An object reference is required for the non-static method, field, or property 'Form1.UpdateCube()''
I am calling this from the class Cube.cs, and the call looks like this:
Form1.UpdateCube();
And this is the UpdateCube function in Form1.cs:
public void UpdateCube()
{
if (BTL.BackColor != mapColor(c1.B.TR))
{
BTL.BackColor = mapColor(c1.B.TR);
System.Console.Write("Mapping");
}
//And so on
}
So why can't I access the function in Form1?