I am getting the error An unhandled exception of type 'System.StackOverflowException' occurred in Forte Sender.exe in my code. I have the understanding that this means there is an infinite loop in my code, but I cannot seem to find this loop. Here is my code:
Form1:
public partial class MainBox : Form
{
//Making a name for the ApplicationProperties form. It can be opened when called.
ApplicationProperties ApplicationPropertiesWindow = new ApplicationProperties();
//All of the functions for form1 below.
Form2:
public partial class ApplicationProperties : Form
{
MainBox MainBoxWindow = new MainBox();
//All of the funcitons for form2 below.
So I have noticed that if I take out the MainBox MainBoxWindow = new MainBox(); that the program will run correctly. But I need that instance there to call a function in Form1. How can I get around this problem? Either a different way to call the function or to solve the infinite loop.