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 is the CTS

1 Answers  


Explain the difference between viewbag and viewdata in mvc?

0 Answers  


What is disconnected scenario? : Entity framework

0 Answers  


Do you know about the new features in asp.net mvc 4 (asp.net mvc4)?

0 Answers  


If we write return statement in finally block will it works fine or throws any error?

7 Answers   Kanbay,






What is namespace used for loading assemblies at run time and name the methods?

2 Answers  


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

1 Answers  


What is GUID , why we use it and where

1 Answers  


What is tempdata?

0 Answers  


What does CLR do after the IL is generated and machine language is generated .Will it look for main method ?

1 Answers   BWT, MMTS, UIU,


How to update one of my table in database at 4pm every day how it is possible?

0 Answers  


Is it possible to share a view across multiple controllers?

0 Answers  


Categories