batutabunsing
Member
- Joined
- Mar 3, 2008
- Messages
- 19
- Programming Experience
- Beginner
Hello everyone. Newbie here in VB.Net VS2005, Winforms Development
Just some clarification with regards to classes in VB.Net.
I have a winform, named frmCarInvoice, and the VB codes are contained in frmCarInvoice.vb.
I have created a new class named MyClass.vb, and the structure of the class is as follows
Namespace Car
Public Class CarFx
Public Shared Function DoSomething() as String
'Do something here
End Function
Public Shared Function DriveSomething() as Integer
'Do some driving.
End Function
End Class
End Namespace
Now, how do I utilize the functions contained in the class MyClass.vb inside my frmCarInvoice.vb? Like for example, I would only invoke the function contained in the class without the full qualifying namespace.
Dim strReturnValue as String = DoSomething()
Instead of:
Dim strReturnValue as String = Car.CarFx.DoSomething
Do I need to declare sort of an imports statement? The intellisense does not show the namespace or the class name.
Advice would be highly appreciated. Thanks.
Just some clarification with regards to classes in VB.Net.
I have a winform, named frmCarInvoice, and the VB codes are contained in frmCarInvoice.vb.
I have created a new class named MyClass.vb, and the structure of the class is as follows
Namespace Car
Public Class CarFx
Public Shared Function DoSomething() as String
'Do something here
End Function
Public Shared Function DriveSomething() as Integer
'Do some driving.
End Function
End Class
End Namespace
Now, how do I utilize the functions contained in the class MyClass.vb inside my frmCarInvoice.vb? Like for example, I would only invoke the function contained in the class without the full qualifying namespace.
Dim strReturnValue as String = DoSomething()
Instead of:
Dim strReturnValue as String = Car.CarFx.DoSomething
Do I need to declare sort of an imports statement? The intellisense does not show the namespace or the class name.
Advice would be highly appreciated. Thanks.