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 ?



if u add an import stmt to an application u can do the same by adding reference to the apllication..

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

Post New Answer

More Dot Net Framework Interview Questions

How .net assemblies are registred as private and shared assembly ?

2 Answers   Infosys, MMTS,


Integer & struct are value types or reference types in .NET?

3 Answers  


How do you handle variable number of segments in a route definition?

0 Answers  


Can you explain the page life cycle of mvc?

0 Answers  


Who defines the CAS code groups

1 Answers  






What is mvc entity framework?

0 Answers  


What is page life cycle?

0 Answers  


Explain covariance and contra-variance in .net framework 4.0. Give an example for each.

0 Answers  


what is deferred loading(lazy loading)?

0 Answers   Microsoft,


How will you load dynamic assembly? How will create assemblies at run time?

3 Answers   Lance Soft, MGL,


What is controllercontext?

0 Answers  


Is .NET a runtime service or a development platform?

1 Answers  


Categories