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 / 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 |
How to add 'ASPNET.mdf' file into server explorer in visual studio 2005?
What are the main components of .net framework?
What is namespaces
WHICH IS MORE SECURED AMONG JAVA AND .NET?
What is model first? : Entity framework
Explain what languages does the .net framework support?
how do you mark a property as required? For example, for a project, the name is a required field.
what is Assemble
How to enable Attribute Routing?
What is the difference between adding routes, to a webforms application and to an mvc application?
Describe the .net framework architecture.
What is shared and private assembly ?
3 Answers Accenture, BirlaSoft,