Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part I: C# Class Fundamentals > Building C# Applications and Libraries

Chapter 1. Building C# Applications and Libraries

In the first edition of Inside C# (Microsoft Press, 2001), the first two chapters gave an overview of object-oriented programming and the .NET environment. While this seemed like a good idea at the time, it meant that you, the reader/programmer, didn’t write code until Chapter 3. Since that book was published, I’ve been fortunate enough to give several talks and teach a few classes on .NET and C# programming. That experience has taught me an important lesson: programmers don’t want lectures—they want code! Therefore, I’m taking a slightly different approach with this edition of the book. Instead of starting with “lay of the land” chapters, I’m going to jump right into programming with C#. I’ll then explain the different architectural aspects of .NET as I explain the syntax of C# as you work your way through the demo applications. Another major departure from the style of the first edition is that after explaining a given topic or language feature at the C# level, I’ll sometimes dive into the nitty-gritty details of how that feature is implemented at the lowest level that we applications programmers can access—the Microsoft intermediate language (MSIL) level.

Let’s begin by writing a “Hello, World” application and building and running it from the command line. From there, you’ll learn how the .NET version of “Hello, World” works under the covers and how it’s executed within the .NET Framework. Once we’ve gone over that, you’ll then write the same application by using Microsoft Visual Studio to see how that development environment can make your programming life much simpler. (You don’t need Visual Studio .NET to work through most of the examples in this book. However, all the examples in this book were created with this tool.) From there, I’ll go into a bit of depth on the internals of a .NET application, what a just-in-time compiler (JITter) is, and how .NET applications are loaded and executed under Microsoft Windows. Finally, the chapter wraps up with a full section on assemblies—what they are, what benefits they provide, and how to build them—and how to create both .NET modules and dynamic-link libraries (DLLs) for multifile applications.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint