if u add an import stmt to an application
u can do the same by adding reference to the apllication

then what is the diff bet these two ?

Answer Posted / praveen n h

when you add the dll reference to an application. It means
that you can use the classes in that namespace.
But if you don't mention the imports(vb)/using(c#) statement
wherever in your application you are referring to that class
you will have to mention the complete class name.
If you use the imports(vb)/using(c#) statement you can
directly mention the class name to use it.

for example
'with imports
imports test 'test is the DLL and it has addtion class in it
.....
class myclass
{
'to create an object of the addition class here is the stmt.
......
addition a = new addition()
.......
}


Without imports

class myclass
{
test.addition a = new test.addition()
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is entity framework slow?

519


What are non action methods in mvc?

542


What is the role of the jit compiler in .net framework?

621


When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, when using razor views?

550


What are the possible razor view extensions?

563






What are the components required to create a route in ASP.Net MVC?

581


why DotNetFramework is included in building a software

2206


Which are the important namespaces used in mvc?

710


What operating systems will the .net framework 3.0 be available for?

564


What is .net architecture and framework?

571


What is viewdata?

583


What are the components of the .net framework.

571


Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

561


Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?

530


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

536