Donis Marshall
PUBLISHED BY Microsoft Press A Division of Microsoft Corporation
One Microsoft Way Redmond, Washington 98052-6399
Copyright © 2006 by Donis Marshall
ISBN:0735621810
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher.
Library of Congress Control Number 2005934153
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWT 0 9 8 7 6 5
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to mspinput@microsoft.com.
Microsoft, IntelliSense, Microsoft Press, MSDN, Visual Basic, Visual C#, Visual Studio, the Visual Studio logo, Win32, Windows, Windows CE, the Windows logo, Windows NT, and WinFX are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.
This book expresses the author's views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Acquisitions Editor: Ben Ryan
Project Editor: Valerie Woolley
Technical Editor: James D. Rogers
Copy Editor: Nancy Sixsmith
Indexer: Tony Ross and Lee Ross
Body Part No. X11-50074
This book is dedicated to my father, Herbert Marshall. He was a nuclear engineer, an artist, a confidant, a doting husband to my mother, and most of all a compassionate person. He was a giant amongst men and touched innumerable lives. His three sons, including myself, miss him every day.
Acknowledgments
Programming Microsoft Visual C# 2005: The Language was completed with the collaboration of several people. I am credited on the cover, but the contribution of others is no less important. I want to especially acknowledge the contributions of Valerie Woolley, Ben Ryan, and Jim Rogers. If possible, they would also receive cover credit. Valerie was the project manager and provided support, encouragement, patience, and the occasional nudge when necessary. Ben, who was the acquisitions editor, had unyielding confidence in my ability, which is greatly appreciated. Jim Rogers was the technical editor and diligently reviewed hundreds of pages of manuscript and code. He helped assure the superb quality of the book.
I also want to thank John Bruno, who is an exceptional engineer, for reviewing and commenting on each chapter, which was very helpful.
Writing a book is an all-consuming project. Unfortunately, much of this burden is carried by friends and loved ones. I appreciate the patience and support of my mother, Lynn, and of my friends Herb, Jr., Chuck, and Patty, along with a long list of other friends who were treated shabbily during this project. Thanks for your understanding.
Finally, I want to acknowledge my children: Jason, Kristen, and Adam. They make every day special. They are my motivation. A special acknowledgment is reserved for Jason. During most of this project, Jason was stationed in Iraq as a Marine. He recently returned home safely. We are proud of you.
Donis Marshall
Donis Marshall is currently one of the few trainers endorsed by Microsoft Global Learning Services to conduct Microsoft technology classes for Microsoft employees. In this capacity, Mr. Marshall travels internationally, delivering dozens of classes to Microsoft developers and engineers in the United States, Europe, and Asia. His repertoire includes classes on Advanced .NET UMD Debugging, Advanced .NET Debugging workshops, .NET Design and Architecture, Visual Basic .NET Programming, .NET Interoperability and Security, .NET Web Services, and ASP.NET. He also teaches .NET classes at Autodesk, NCCI, and NASA.
Donis Marshall is a nationally recognized teacher of computer technology to developers and scientists. As founder and lead instructor for The Training Alliance, he taught advanced technical classes for many Fortune 500 clients. He also managed a staff of technical instructors as Director of Advanced Technical Learning Services at Productivity Point International, a national franchiser of training services.
Mr. Marshall is President of DebugNow (www.debugnow). DebugNow offers an assortment of innovative tools for support engineers and developers to debug and monitor Win32 and .NET applications.
As a contractor, Donis Marshall has written thousands of lines of code for various entities.