![]() |
[VisualBasic] A few questions on commands
I know java pretty well and am now learning Visual Basic and I'm having some problems.
First, what is the Visual Basic equivalent to Java's try-catch error resolving? I can't find this anywhere in my VB book. Does Basic have something similar? Second, Is there a command to see if a file exists? Thanks |
I think starting with Visual Basic.NET, you can use:
Try (arguments) Catch End Try |
well, i'm not using the .net version...VB6 doesn't have that but I found it anway.
I do have another question now though. Can someone explain the structure of a class and relate it to a typical java class? I understand java classes pretty good but I'm pretty lost on VB classes (at least with the variables and properties...I don't understand what those are). Also, with methods, how do I "return" a value? |
Quote:
|
A VB Class is not a whole lot different to a Java class. It needs to be defined within a class module, and is simply a collection of hidden variables that are accessed via 'Property Let' and 'Property Get' statements - So, say I want to create a class that represents a Cartesian Coordinate called CartCoord, I'd create a class module Called CartCoord and fill it with the following:
Code:
Private privX as Double Code:
Set MyPoint = New CartCoord |
All times are GMT -8. The time now is 02:19 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project