Skip Navigation LinksHome > Categories > Code from a Category

Importing Namespaces - make the code short



User Name: jamest85
Name: James T
Contact Me: www.datawebcoder.com/ContactUs.aspx
Home Page: www.datawebcoder.com
4 years experience on Zoho consulting, implementation, and programming using C#, VB, Php..., 9 years of total IT experience including programming and application development. 5 years of Experienced an... [More]
Viewed Times: 225
Add Date: 08/20/2010
To import namespaces really make the code short and more manageable.
If we have a project that contains DLLs, in the DLLs contains namespaces and classes, if we don't import namespaces, the line of code will be quite long.

Below is code to create objects based on the classes in the DLLs. You can see these 2 long lines: Now, if I use Imports, that will make the code much shorter: Even better, you can import the namespaces in a project-wide basis, so you don't need do Imports at the top of each of .vb file

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
 
    
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.