Showing my ignorance

hog

Senior Contributor
Joined
Mar 17, 2003
Messages
984
Location
UK
Although I seem to b able to write some decent apps in VB.NET, well for work anyway and the odd one for fun I do think I'm missing some of the basic understanding of the language:(

Can someone enlighten me on this one please?

this line block of code;

Visual Basic:
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D
Imports Direct3D = Microsoft.DirectX.Direct3D

1. wouldn't the first line suffice? If Imports Microsoft.DirectX is imported then doesn't the project then have access to all namespaces within it?

2. I don't understand Imports Direct3D = Microsoft.DirectX.Direct3D at all?

Thnx
 
Importing a namespace doesn't automatically import all the contained namespaces - each one needs to be done individually.

the 3rd one imports Microsoft.DirectX.Direct3d and aliases it to Direct3D. You could use the namespace Direct3D instead of the fully qualified namespace of Microsoft.DirectX.Direct3D
 
Back
Top