.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.
Also read
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.............
There are various collection types in .NET which are used for manipulation of
data. Collections are available in System.Collections namespace................
Static members are not associated with a particular instance of any
class................
The System.Environment class can be used to retrieve information...............
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................
|