A new guy...
-
Hi everybody. As a computer science major I've chosen to focus on programming. More specifically, VB.NET and C#. Is this a good place to ask some very basic questions? Here is my first one: When writing functions and subs, is there some sort of 'rule of thumb' that says when a separate class should be used instead of simply including it all in one .vb file? Thanks Brad
-
Hi everybody. As a computer science major I've chosen to focus on programming. More specifically, VB.NET and C#. Is this a good place to ask some very basic questions? Here is my first one: When writing functions and subs, is there some sort of 'rule of thumb' that says when a separate class should be used instead of simply including it all in one .vb file? Thanks Brad
My rule is, Each class should have it's own file... unless the class is a data container class relating to the first class. This way you know that MainForm.vb contains the MainForm class etc But of course I'm an old school C++ programmer, maybe VB'ers do it differently. Michael 'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
-
My rule is, Each class should have it's own file... unless the class is a data container class relating to the first class. This way you know that MainForm.vb contains the MainForm class etc But of course I'm an old school C++ programmer, maybe VB'ers do it differently. Michael 'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
Thanks Michael. I appreciate the input.