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

What's the .NET class that allows the retrieval of a data element using a unique key

1 Answers  


can we call the garbage collector to run explicicitly?

6 Answers   Kanbay, Volvo,


What are ajax helpers in asp.net mvc?

0 Answers  


Will the finally block get executed if an exception has not occurred

1 Answers   Siebel Systems,


How we can handle the exception at controller level in ASP.Net MVC?

0 Answers  






What is Layout in ASP.Net MVC?

0 Answers   B-Ways TecnoSoft,


Describe the .net framework architecture.

0 Answers  


Explain what is routing?

0 Answers  


When do you absolutely have to declare a class as abstract

1 Answers   Siebel Systems,


How we can add the CSS in ASP.Net MVC?

0 Answers  


What is the use of viewmodel in mvc?

0 Answers  


If u have an Empty Xml file and u have to bind dataset data to empty xml file? if u have an empty dataset u have to bind xml file data to it?

0 Answers  


Categories