Chapter 15: Working with Collections and Lists


Overview

Over the years Microsoft Windows has grown into an enterprise-caliber operating system that millions of companies and users worldwide depend on daily. Windows NT and Windows 2000 have proved themselves as solid and stable operating systems, providing scalability, reliability, and return on investment ( ROI ).

The one area where Windows suffers today compared with its main rivals is the complexity of its developer platform. Yes, Windows has fantastic tools available for development (like Visual Studio), but Windows supports ever-growing numbers of APIs and object models that are increasingly inconsistent, fragmented , and difficult to learn.

The complexity of developing on the Windows platform is a problem that Microsoft has understood for some time. A major objective for .NET was to bring simplicity and consistency to the Windows development platform, making it more competitive with Java in that respect, without sand-boxing developers or sacrificing performance. From a consistency and accessibility viewpoint, the Common Language Runtime ( CLR ) provides the foundations that enable this. The .NET Framework uses the CLR to provide a clean object-oriented approach to development by grouping classes within hierarchical namespaces, as well as making the functionality of the platform simple and consistent.

A key part of an object-oriented development platform like .NET is its Base Class Library . The classes in this library provide core functionality, with which developers can build applications and class libraries. If you have ever programmed with the C/C++ Standard Template Library ( STL ), used the VB.NET scripting runtime objects or the Java SDK, you'll have a good idea of the type of functionality that the .NET Framework base classes provide.

This chapter and the next one will examine some of the commonly used classes in the .NET Framework Base Class Library that have been designed to allow applications to be built quickly and elegantly. As such, there are far too many classes in the .NET Framework to cover in just one book.

This chapter focuses on collections, and the next covers files and regular expressions.

Computers have been designed essentially to store and manipulate data, and ever since I started programming (which feels like a very long time ago now) I've spent a sizable chunk of my time writing code to manage sets of data held in different types of data structures, such as queues, dictionaries, and stacks. I doubt that I'm the only developer who's spent time doing this and because working with different data structures is such a universal and common requirement, the .NET Framework provides an impressive class library for dealing with common data structures.

By the end of this chapter, you will:

  • Understand the support provided by the .NET Framework for working with common data structures such as lists, queues, stacks, and dictionaries.

  • Have a working knowledge of the most important collection interfaces and classes in the System.Collections and System.Collection.Specialized namespaces

  • Know how to build strongly typed collection classes.




Professional ASP. NET 1.1
Professional ASP.NET MVC 1.0 (Wrox Programmer to Programmer)
ISBN: 0470384611
EAN: 2147483647
Year: 2006
Pages: 243

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net