|
-
Apr 1st, 2002, 12:56 PM
#1
Thread Starter
Lively Member
Are these commands different ?
Both methods below work fine in VB.NET, it's doesn't do anything as such, just showing different syntax. What I want to know is, Is there a difference ?
Once I add the 'import' it will then allow me to go either 'dir' or 'vb.dir', are they both doing exactly the same thing ? Which one is prefered ? Is it just syntax ? Or something else ?
Thanks
Imports VB = Microsoft.VisualBasic
METHOD 1:
Dim Test As String
Test = Dir("C:\")
Test = "1234567"
If IsNumeric(Test) Then
'...
End If
Test = Format(Test, "#,###,###")
METHOD 2:
Dim Test As String
Test = VB.Dir("C:\")
Test = "1234567"
If VB.IsNumeric(Test) Then
'...
End If
Test = VB.Format(Test, "#,###,###")
-
Apr 1st, 2002, 01:32 PM
#2
Imports are just shortcuts and are not required. Neither wayu is faster..it all about saving the dev typing..
-
Apr 1st, 2002, 02:25 PM
#3
Frenzied Member
What Cander said, just saves you from typing Microsoft.VisualBasic.
Dont gain the world and lose your soul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|