Introduction

It was October 1999 when some people at Microsoft first demonstrated the Microsoft .NET Framework, the common language runtime (CLR), and the C# programming language to me. The moment I saw all of this, I was impressed and I knew that it was going to change the way I wrote software in a very significant way. I was asked to do some consulting for the team and immediately agreed. At first, I thought that the .NET Framework was an abstraction layer over the Win32 API and COM. As I invested more and more of my time into it, however, I realized that it was much bigger. In a way, it is its own operating system. It has its own memory manager, its own security system, its own file loader, its own error handling mechanism, its own application isolation boundaries (AppDomains), its own threading models, and more. This book explains all these topics (and more) so that you can effectively design and implement software applications and components for this platform.

It is October 2012 as I write this text, making it 13 years now that I’ve worked with the .NET Framework and C#. Over the 13 years, I have built all kinds of applications and, as a consultant to Microsoft, have contributed quite a bit to the .NET Framework itself. As a partner in my own company, Wintellect (http://Wintellect.com), I have worked with numerous customers to help them design software, debug software, performance-tune software, and solve issues they have with the .NET Framework. All these experiences have really helped me learn the spots that people have trouble with when trying to be productive with the .NET Framework. I have tried to sprinkle knowledge from these experiences through all the topics presented in this book.

Who This Book Is For

The purpose of this book is to explain how to develop applications and reusable classes for the .NET Framework. Specifically, this means that I intend to explain how the CLR works and the facilities that it offers. I’ll also discuss various parts of the Framework Class Library (FCL). No book could fully explain the FCL—it contains literally thousands of types now, and this number continues to grow at an alarming rate. Therefore, here I’m concentrating on the core types that every developer needs to be aware of. And although this book isn’t specifically about Windows Forms, Windows Presentation Foundation (WPF), Microsoft Silverlight, XML web services, Web Forms, Microsoft ASP.NET MVC, Windows Store Apps, and so on, the technologies presented in the book are applicable to all these application types.

The book addresses Microsoft Visual Studio 2012, .NET Framework 4.5, and version 5.0 of the C# programming language. Because Microsoft tries to maintain a large degree of backward compatibility when releasing a new version of these technologies, many of the things I discuss in this book apply to earlier versions as well. All the code samples use the C# programming language as a way to demonstrate the behavior of the various facilities. But, because the CLR is usable by many programming languages, the book’s content is still quite applicable for the non-C# programmer.

Note

You can download the code shown in the book from Wintellect’s website (http://Wintellect.com/Books).

My editors and I have worked hard to bring you the most accurate, up-to-date, in-depth, easy-to-read, painless-to-understand, bug-free information. Even with this fantastic team assembled, however, things inevitably slip through the cracks. If you find any mistakes in this book (especially bugs) or have some constructive feedback, I would greatly appreciate it if you would contact me at .

Acknowledgments

I couldn’t have written this book without the help and technical assistance of many people. In particular, I’d like to thank my family. The amount of time and effort that goes into writing a book is hard to measure. All I know is that I could not have produced this book without the support of my wife, Kristin, and my two sons, Aidan and Grant. There were many times when we wanted to spend time together but were unable to due to book obligations. Now that the book project is completed, I really look forward to adventures we will all share together.

For this book revision, I truly had some fantastic people helping me. Several people on the .NET Framework team (many of whom I consider friends) reviewed chapters and participated in stimulating conversations with me. Christophe Nasarre, who I’ve worked with on several book projects, has done just a phenomenal job of verifying my work and making sure that I’d said everything the best way it could possibly be said. He has truly had a significant impact on the quality of this book. As always, the Microsoft Press team is a pleasure to work with. I’d like to extend a special thank you to Ben Ryan, Devon Musgrave, and Carol Dillingham. Also, thanks to Susie Carr and Candace Sinclair for their editing and production support.

Errata & Book Support

We’ve made every effort to ensure the accuracy of this book and its companion content. Any errors that have been reported since this book was published are listed on our Microsoft Press site at oreilly.com:

If you find an error that is not already listed, you can report it to us through the same page.

If you need additional support, email Microsoft Press Book Support at .

Please note that product support for Microsoft software is not offered through the addresses above.

We Want to Hear from You

At Microsoft Press, your satisfaction is our top priority, and your feedback our most valuable asset. Please tell us what you think of this book at:

The survey is short, and we read every one of your comments and ideas. Thanks in advance for your input!

Stay in Touch

Let’s keep the conversation going! We’re on Twitter: http://twitter.com/MicrosoftPress.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.35.185