Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

General VB.NET Question...

I've been using .NET for about 6 months now, but still occassionally get confused by the whole Reference/Assembly/Imports deal within a Standard windows project (or any .NET project for that matter). Can someone please explain why, for instance, after creating an empty VB.NET windows application, do I need to use the Imports keyword within the scope of my code to gain access to say the "ControlsChars" class (Within the Microsoft.VisualBasic namespace, Microsoft Visual Basic .NET assembly), but I do not need to use the Imports keyword to gain access to the "Array" class. (Within the System namespace, MSCORLIB assembly) I'm guessing it's because somewhere at the project level, the MSCORLIB has been automatically imported for me, but I can't find it anywhere...

Understanding this would help me understand why a few other things within the framework as well, and would be greatly appreciated. Forgive me in advance if this is the stupidest question ever posted here. ;)
0
wgyger
Asked:
wgyger
  • 2
1 Solution
 
iboutchkineCommented:
Go to Project Properties-Common Properties-Imports and you will see what is imported by default
0
 
wgygerAuthor Commented:
That would explain it...Thanks.
0
 
wgygerAuthor Commented:
Actually, that would explain why it's "available" to the project, but why do I (we) need to explicitly "Import" the namespace into a code module to gain access to the ControlsChars class, but I don't have to do this with the Arrays class. Both class assemblies are listed in the imports property section.

Very confusing to say the least.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now