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

what is code first approach?

588


Explain the request flow in asp.net mvc framework?

549


What is a razor file?

530


Where are the routing rules defined in an asp.net mvc application?

544


What symbol would you use to denote, the start of a code block in razor views?

571






What are authentication filters in web api?

577


What filters are executed in the end?

594


Which are the important namespaces used in ASP.Net MVC?

599


How does the .net framework 3.0 relate to the .net framework 2.0?

558


What is storage model? : Entity framework

556


What is rxjava used for?

660


what is eager loading?

573


What is iobjectset? : Entity framework

589


How the ‘page lifecycle’ of ASP.Net MVC does works?

595


Does razor engine supports for tdd?

736