I stripped my code to the parts that cause the problem. The code jumps back and forth lines 5 and 9 here, causing stackoverflowexception.
How could I do this differently? I need the Platform instance inside Game class to use in functions.
namespace Games
{
public class Game
{
private Platform platform = new Platform();
}
class Platform : Game
{
private bool[] squares = new bool[9];
}
}
Platforma sub-class ofGame.