CHAPTER 1 THE PHILOSOPHY OF .NET 23 ‘ Hello world in VB .NET Imports System Public Module MyApp Sub Main() Console.WriteLine(”Hi from VB .NET”) End Sub End Module // Hello world in Managed Extensions for C++ #include “stdafx.h” using namespace System; int main(array ^args) { Console::WriteLine(L”Hi from managed C++”); return 0; } Notice that each language is making use of the Console class defined in the System namespace. Beyond minor syntactic variations, these three applications look and feel very much alike, both physically and logically. Clearly, your primary goal as a .NET developer is to get to know the wealth of types defined in the (numerous) .NET namespaces. The most fundamental namespace to get your hands around is named System. This namespace provides a core body of types that you will need to leverage time and again as a .NET developer. In fact, you cannot build any sort of functional C# application without at least making a reference to the System namespace. Table 1-4 offers a rundown of some (but certainly not all) of the .NET namespaces. Table 1-4. A Sampling of .NET Namespaces .NET Namespace Meaning in Life System Within System you find numerous useful types dealing with intrinsic data, mathematical computations, random number generation, environment variables, and garbage collection, as well as a number of commonly used exceptions and attributes. System.Collections These namespaces define a number of stock container objects System.Collections.Generic (ArrayList, Queue, and so forth), as well as base types and interfaces that allow you to build customized collections. As of .NET 2.0, the collection types have been extended with generic capabilities. System.Data These namespaces are used for interacting with databases using System.Data.Odbc ADO.NET. System.Data.OracleClient System.Data.OleDb System.Data.SqlClient System.Diagnostics Here, you find numerous types that can be used to programmatically debug and trace your source code. System.Drawing Here, you find numerous types wrapping graphical primitives System.Drawing.Drawing2D such as bitmaps, fonts, and icons, as well as printing capabilities. System.Drawing.Printing Continued
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.
This entry was posted
on Thursday, January 17th, 2008 at 6:14 pm and is filed under Coldfusion.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.