I\'m writing a WindowsForms application in MS Visual C#, and I need two forms to be able to reference each other. As I test, I created two buttons on Form1 -- one button tha
When you create an instance of Form2 on the frm1 object, this new instance creates another Form1 instance, that creates a new Form 2 instance, that...
Do you see the infinite loop?
Create one instance of each other on the main class or as global application variables. Or pass them as parameter to each other. The .NET framework will just reference them without alocating new memory space.