Bullfrog1870
Technical User
I still don't understand when to use the keyword New and when not to, when declaring an object.
Example: System.IO.Directory does not require a New keyword to create a variable. However, System.IO.DirectoryInfo does require New for a new variable.
How do I know this? Other than trial-n-error, or asking explicitely, how do I know?
strPath = System.IO.Directory.GetCurrentDirectory()
myDirectory = New System.IO.DirectoryInfo(.....)
Thanks!
Example: System.IO.Directory does not require a New keyword to create a variable. However, System.IO.DirectoryInfo does require New for a new variable.
How do I know this? Other than trial-n-error, or asking explicitely, how do I know?
strPath = System.IO.Directory.GetCurrentDirectory()
myDirectory = New System.IO.DirectoryInfo(.....)
Thanks!