Form reference causing Stackoverflow Exception

148 views Asked by At

I'm getting this error:

An unhandled exception of type 'System.StackOverflowException' occurred in Microsoft.VisualStudio.HostingProcess.Utilities.dll

Whenever I create the class:

class Trader : Form1
{
    public void changeText(string text) {
        changeLabel(text) //A method inside my Form1.Designer.cs
    }
}

I feel like I'm doing this wrong, I want to access and modify design elements within the Windows Form I am using (Form1). Any ideas?

1

There are 1 answers

0
StackOverload On

I was calling the class Trader within the class Form1.