'Are objects from imported namespaces accessed differently in C# than in VB?

If I want to use the DriveInfo object in C#, I need to import the System.IO namespace. I can then access the object and any of its methods within the Main method.

If I try to do the same thing in a VB console app, it doesn't work. Apparently, I have to prefix DriveInfo with IO within the Main procedure (IO.DriveInfo), although I’ve already provided that in the Imports statement (Imports System.IO). What is going on here?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source