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 do you create shared assemblies ?

1 Answers  


What are the contents of assembly?

2 Answers  


In razor syntax, what is the escape sequence character for @ symbol?

0 Answers  


How do you box a primitive data type variable ?

1 Answers  


What are the possible razor view extensions?

0 Answers  


Tell me about the internal working of Garbage collector?

3 Answers   Honeywell,


what is .net?

20 Answers   IBM,


List the new features added in .net framework 4.0.

0 Answers  


Which are the abstract classes available under system.xml namespace

1 Answers  


Which is the best institute in chennai to learn DotNet?

7 Answers  


Define .NET architecture ?

3 Answers   TCS,


What is a serverside technology? what is a clientside technology? what is a clientserver technology? what is a internet based application? what is a intranet based application? what is a windows application? what is a console application? Difference between console application and windows application?

4 Answers   IBM,


Categories