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 |
Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
What is web api‘s in asp.net mvc 4 ?
how to disable the lazy loading framework?
what are background threads? give ex?
How do you do role based security ?
1 Answers Accenture, BirlaSoft,
How to return the JSON from action method in ASP.Net MVC?
What are Satellite Assemblies? How you will create this?
can i change web.config settings from iis?
1 Answers HCL, ReadySoft, Wipro,
How do assemblies find each other?
Where are the value-type variables allocated in the computer RAM ?
Is dapper better than entity framework?
What is the 'page life cycle' of an ASP.NET MVC?