M
Miro
Again, not looking to waste a lot of time here... its a simple question, the
code works, but wanted to get some simple opinions.
I have this: ( to create a "data" folder )
Imports System.IO 'Required for DirectoryInfo
-and then in a function...
Dim FolderInfo As DirectoryInfo = New DirectoryInfo("Data")
If Not System.IO.Directory.Exists(FolderInfo.ToString) Then
FolderInfo.Create()
End If
'Continue code here
Is that correct to create a "FolderInfo" variable and then use the
System.IO.Directory.Exist on it to create it?
-Is it correct to FolderInfo.ToString it ? Or should I create a "Dim
Folder As String = "Data" and use that there instead?
One last question...
How would I know to add an Imports line ? is there something I should
always look for to know Im missing one?
Thanks,
Miro
code works, but wanted to get some simple opinions.
I have this: ( to create a "data" folder )
Imports System.IO 'Required for DirectoryInfo
-and then in a function...
Dim FolderInfo As DirectoryInfo = New DirectoryInfo("Data")
If Not System.IO.Directory.Exists(FolderInfo.ToString) Then
FolderInfo.Create()
End If
'Continue code here
Is that correct to create a "FolderInfo" variable and then use the
System.IO.Directory.Exist on it to create it?
-Is it correct to FolderInfo.ToString it ? Or should I create a "Dim
Folder As String = "Data" and use that there instead?
One last question...
How would I know to add an Imports line ? is there something I should
always look for to know Im missing one?
Thanks,
Miro