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
Is entity framework slow?
What are non action methods in mvc?
What is the role of the jit compiler in .net framework?
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?
What are the possible razor view extensions?
What are the components required to create a route in ASP.Net MVC?
why DotNetFramework is included in building a software
Which are the important namespaces used in mvc?
What operating systems will the .net framework 3.0 be available for?
What is .net architecture and framework?
What is viewdata?
What are the components of the .net framework.
Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?
Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?
Will there be a .net compact framework 3.0 release with release of .net framework 3.0?