jayplus707
Programmer
I'm new at C# and I can't figure this out. I have two forms. One is called frmTitle. The other is called frmPasswords. My main is in frmTitle. I created a function called doThis() inside my frmTitle class. I used the following code:
public void doThis() {}
And within my main, it starts like this:
Application.Run(new frmTitle());
Right afterwards, I want to put:
frmTitle.doThis();
But I get a reference error (An object reference is required for the nonstatic field, method, or property)! I know it's probably something stupid I overlooked, so can someone help me? I've tried just doing frmTitle. to see what members/functions come up, and my doThis function doesn't come up. Why not? I even tried doing it from my other form and it still doesn't come up....=\
public void doThis() {}
And within my main, it starts like this:
Application.Run(new frmTitle());
Right afterwards, I want to put:
frmTitle.doThis();
But I get a reference error (An object reference is required for the nonstatic field, method, or property)! I know it's probably something stupid I overlooked, so can someone help me? I've tried just doing frmTitle. to see what members/functions come up, and my doThis function doesn't come up. Why not? I even tried doing it from my other form and it still doesn't come up....=\