How to separate business logic to classes from windows form in Visual Studio : <p>I'm working within C# and visual studio and have made a Windows Form (<code>MainForm</code>) - it has a good amount of buttons that work through a number of process'.</p>

<p>Currently - it actually works fine, I just wanted to 'make it work'. However, all my code lies in the <code>MainForm.cs</code> file and I believe that is bad practice. I've got a lot of methods in there that I feel would be better placed in appropriate classes.</p>

<p>I have gathered through reading that <code>buttonClick</code> events should live in the Form class, but then should hand off the rest of the work to classes for which the buttons exist (i.e. if a button says to 'backup pictures', I should have a Pictures class with a 'backup' method).</p>

<p>Is there a good way in visual studio to go about doing that?</p>

<p>Are there any helpers to take existing methods and put them into their own classes?</p>
