Interview questions

.Net - Imports and Using Statements

Next question>>           Learn .NET
.Net - Explain the importance of Imports and Using Statements. - June 03, 2009 at 11:00 AM by Shuchi Gauri

Explain the importance of Imports and Using Statements.

Import statement: creates a property on the global object with the name supplied as namespace and initializes it to contain the object that corresponds to the namespace being imported. Any properties created using the import statement cannot be assigned to, deleted, or enumerated. All import statements are executed when a script starts.

Using statements: mainly defines the namespaces whose objects will be used in the form. This clearly solves 2 purposes: Defines all the namespaces that will be used in a form. Secondly, reduces the hassle for the programmer to type the name of namespace again and again while using classes/objects that belong to the namespace.

Next question>>

Also read

Explain the namespaces in which .NET has the data functionality class.

System.data contains basic objects. These objects are used for accessing and storing relational data. Each of these is independent of the type of data source and the way we connect to it.............

.NET constants, enum, arrays and collection

There are various collection types in .NET which are used for manipulation of data. Collections are available in System.Collections namespace................

Explain the use of static members with example using C#.NET.

Static members are not associated with a particular instance of any class................

What is the use of System.Environment class in C#.NET?

The System.Environment class can be used to retrieve information...............

Explain the use of virtual, sealed, override, and abstract.

The virtual keyword enables a class to be overridden. If it has to be prevented from being overridden, then the sealed keyword needs to be used. If the keyword virtual is not used, members of the class can even then be overridden................



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring