3.7 Scope and Accessibility in Class Modules The

Chapter 4. The .NET Framework: General Concepts In this chapter, we discuss some of the main concepts in the .NET Framework. This is intended as a general overview, just to give you the “lay of the .NET land,” so to speak. For more information, see Thuan Thai and Hoang Q. Lam’s .NET Framework Essentials (O’Reilly, 2001). 4.1 Namespaces The notion of a namespace plays a fundamental role in the .NET Framework. In general, a namespace is a logical grouping of types for the purpose of identification. For example, imagine that in a certain business there is an executive named John Smith, a secretary named John Smith, and a custodian named John Smith. In this case, the name John Smith is ambiguous. When the paymaster stands on a table and calls out the names of people to receive their pay checks, the executive John Smith won’t be happy if he rushes to the table when the paymaster calls out his name and the envelope contains the custodian John Smith’s pay check. To resolve the naming ambiguity, the business can simply define three namespaces: Executive, Secretarial, and Custodial. Now the three individuals can be unambiguously referred to by their fully qualified names: Executive.John Smith Secretarial.John Smith Custodial.John Smith The .NET Framework Class Library (FCL), which we look at in more detail in Chapter 5, consists of several thousand classes and other types (such as interfaces, structures, and enumerations) that are divided into over 90 namespaces. These namespaces provide basic system services, such as: Basic and advanced data types and exception handling (the System namespace) Data access (the System.Data namespace) User-interface elements for standard Windows applications (the System.Windows.Forms namespace) User-interface elements for web applications (the System.Web.UI namespace) In fact, the VB .NET language itself is implemented as a set of classes belonging to the Microsoft.VisualBasic namespace. (The C# and JScript languages are also implemented as a set of classes in corresponding namespaces.) For information on accessing the members of a namespace, see Section 4.5 later in this chapter. Namespaces are not necessarily unique to the Framework Class Library; you can also create your own namespaces by using the Namespace statement at the beginning of a code file. 4.2 Common Language Runtime (CLR), Managed Code, and Managed Data The Common Language Runtime (CLR) is an environment that manages code execution and provides application-development services. Compilers such as VB .NET expose the CLR’s functionality to enable developers to create applications. Code that is created under this environment is called managed code . Note that COM components are not managed code, although they (as well as other unmanaged code) can be used in applications that are built under the CLR.
Note: If you are looking for good and high quality web space to host and run your java application check Vision java hosting services

Comments are closed.