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
What are the advantages of mvc over asp.net?
How do you specify comments using razor syntax?
What you mean by routing in asp.net mvc?
How you can implement custom validation in asp.net MVC?
what is deferred loading(lazy loading)?
How we can add the css in mvc?
What is tempdata?
explain how you can load related entities in ef (entity framework)?
What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?
Is razor a server side?
How does the 'page lifecycle' of asp.net mvc works?
How route table has been created in asp.net mvc?
Which version of the common language runtime (clr) does the .net framework 3.0 use?
What are the main components of .net framework?
Explain .Net Framework? Why we use it?