-
class or module
Hi
I am using vb.net 2003. I have a class in which i have define public function for connection and many more. And in each form i have to call object for that class. I want to know that it is better to define all class function in modules. because modules not need to create an object in each form.
Can pls guide which one is better method for memory management and better usability
thanks
asm
-
Re: class or module
Class are batter as compare to module just look the difference between the class and the module.
-
Re: class or module
Use a class and create an instance. ADO.NET is specifically designed such that multiple connection objects are handled efficiently.
-
Re: class or module
Also consider a singleton class - this is a class that is created once (when you first access it) and is then available globally under the same reference.