Examining the .NET Class Framework Using Files and Strings

Chapter 5

Examining the .NET Class Framework Using Files and Strings

Now that you understand object-oriented programming and have a good understanding of data types, it's time to examine the Microsoft .NET Framework and how you work with it using Microsoft Visual Basic .NET. As you now know, the .NET Framework is an object-oriented, hierarchical class library. The prebuilt functionality in the framework can be tapped into to provide enormous power in a few lines of code. The framework library can be utilized across multiple languages and platforms in a consistent manner.

For over a decade, the Visual Basic language has been a cornerstone of the Microsoft Windows platform. The impact that Visual Basic 1 had on the Windows market was tremendous—for the first time, a programmer could write Windows applications simply and painlessly. This capability came about because the development approach taken with Visual Basic could be grasped by a wide range of programmers. The introduction of support for COM type libraries in Visual Basic 4 helped quickly establish it as the standard object architecture for the Windows platform.

As I mentioned in Chapter 1, "Visual Basic .NET from the Ground Up," Microsoft recognizes that the programming industry is in the middle of a shift from providing software on CDs to providing functionality as Web services via the Internet. The .NET Framework is a key part of Microsoft's strategy to make this transition as painless as possible: the framework is designed from the ground up to enable developers to write and deploy complex Web, network, and stand-alone applications that can run on a variety of hardware platforms.

As this transition to multiple platforms occurs, Visual Basic must retain a certain relevance to developers by becoming a first-class supporter of the .NET Framework. In some cases, the features needed to support the .NET Framework conflict with features in the classic Visual Basic language. But to thoroughly support the framework, Microsoft decided to loosen the bonds of backward compatibility and take the language a step forward in evolution. As you can see throughout this book, the .NET Framework extends the capability of the Windows API and is incredibly powerful, consistent, and easy to use. Of course, you still have access to the Windows API if you require it. However, the .NET Framework is a superset of the API, so the cases in which you'll need to be backward compatible will be rare.

In this chapter, I'll review the organization of the .NET class framework and provide some guidance on how best to locate the classes and functionality you need to include in your programs. Then, using file management classes as an example, we'll continue our investigation of how to work with classes in Visual Basic .NET. Finally, because handling strings is such a critical part of any program, I'll cover how to use the String data type in more detail.



Coding Techniques for Microsoft Visual Basic. NET
Coding Techniques for Microsoft Visual Basic .NET
ISBN: 0735612544
EAN: 2147483647
Year: 2002
Pages: 123
Authors: John Connell

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