Where to find Microsoft.win32 namespace?

borris83

Member
Joined
Apr 30, 2009
Messages
23
Programming Experience
Beginner
I read in msdn that registrykey class is found in Microsoft.win32 namespace

But when I try to add a reference to my project, I couldn't find Microsoft.win32 in the list.

What should I do?
 
Or just declare the class like so:
Dim MyMsdn As Microsoft.win32.msdn

Adding an imports at the top of the class/module file simply gives you a shortcut to it when finding it in the Intellisense so you don't have to type in the 'Microsoft.win32' all the time.
 
ggunter said:
You don't actually add a reference.
... because you are already implicitly referencing the mscorlib.dll assembly that contains this namespace with the registry types. This don't show up in the Reference list, and the reason is all VB projects (must) implicitly reference the Microsoft.VisualBasic.dll assembly, which in turn reference the mscorlib library, the compiler adds these. The former contains the VB Runtime library and the latter the .Net Common Language Runtime library (CLR, at some time called Common Object Runtime), both containing core functionality.

As you probably have understood by previous answers borris83 you can reference assemblies and import namespaces, for every type you look up in help you can see what assembly (library) and namespace it belongs.
 
Back
Top