Question on methods and forms..

melegant

Regular
Joined
Feb 2, 2003
Messages
52
Location
NY
I have a form with quite a number of form related methods, close now to 30.

I was thinking..should i make a sepereate class in vb.net , inherit that particluar form class and move most of the methods there?

even more, should i compile it as a dll? really i am looking for the 'right' way to do things..

thanks.
 
First of all its easier like that if your form will be using them :) you wont need to declare anything and things like that :D . And if they are form related you do not need to move them.
 
Keep them local and private as long as possible.
Proximity rules.

Keep them public and generic if you could reuse them from other forms.
But that would not necessarily mean that they'd all end up in the same class.

In your example I see no benefit in declaring a new class that inherits the form. It would not even make the code re-useable for other forms/classes.
 
Back
Top