<za***@construction-imaging.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
>
wi******@yahoo.com wrote:
>That's great, didn't know you could do that :)
Thanks Mythran!
Phil
I use that same trick to provide shortcut references to VB functions as
in:
Imports VB = MicrosoftVisualBasic
If VB.Left(blah) ...
Usually, we don't do that in our office. But once in a great while, there
comes a time where two namespaces collide. For example:
SomeCompany.Security.Principal namespace, System.Security.Principal
namespace and OurCompany.Security.Principal namespace. We don't want to
type out the full namespace, so we just use the specified imports shortcut.
Another thing that we usually don't use, but have done...albeit rarely, is
import a class directly so that we don't have to type out the class name....
Example:
We have a class named Common with all shared members. We just want to call
the members/methods directly without specifying Common everywhere... (this
only works in VB.Net and not C# afaik)...
Imports OurNamespace.OurApplication.Common
Here we directly import the namespace + classname and now instead of
Common.MethodName() we can just use MethodName() ...
Cheers!
Mythran