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
How do I install .net framework?
Does windows 10 need .net framework?
What is the difference between old ADO.NET and Entity framework coding techniques?
List out few different return types of a controller action method?
what is entity framework advantage?
What are advantages of Dependency Injection (DI) in ASP.Net MVC?
What is entitytype? : Entity framework
Describe the .net framework architecture.
Does razor engine supports for tdd?
Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?
How to return the JSON from action method in ASP.Net MVC?
Is it possible to cancel filter execution?
What is a model in programming?
What are the 3 main components of an asp.net mvc application?
What is edm (entity data model)? : Entity framework