The way my code is now its all basically in one class and I want to move different functions into other classes to organise it a bit.

What is the best way to do this as I have been having problems -

I was just bringing in a new Main class when I needed to call the functions in my main class but this would give errors when I run the program and not let me run it?

Private mc as new Main()
mc.functionNeeded

But the error when I try to run
"Stack over flow exception"

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll

Any tips on how this is done. I couldnt find any info on it (probably because its so basic)

Thanks,

>Stack over flow exception

That Method is called again and again - recursively.

Hi,
Just not sure why that would be caused?
What is the best way to be able to call functions/subs between classes?
thanks,

>What is the best way to be able to call functions/subs between classes?

There are no alternates. Please show your code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.