13.07.2015 Views

C# in Depth

C# in Depth

C# in Depth

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

26 CHAPTER 1 The chang<strong>in</strong>g face of <strong>C#</strong> developmentit utilizes. The amount of code <strong>in</strong> the library is much larger than that of the runtime,<strong>in</strong> the same way that there’s much more to a car than the eng<strong>in</strong>e.The .NET libraries are partially standardized. Partition IV of the CLI specificationprovides a number of different profiles (compact and kernel) and libraries. Partition IVcomes <strong>in</strong> two parts—a general textual description of the libraries, <strong>in</strong>clud<strong>in</strong>g whichlibraries are required with<strong>in</strong> which profiles, and another part conta<strong>in</strong><strong>in</strong>g the details ofthe libraries themselves <strong>in</strong> XML format. This is the same form of documentation producedwhen you use XML comments with<strong>in</strong> <strong>C#</strong>.There is much with<strong>in</strong> .NET that is not with<strong>in</strong> the base libraries. If you write a programthat only uses libraries from the specification, and only uses them correctly, youshould f<strong>in</strong>d your code works flawlessly on any implementation—Mono, .NET, or anyth<strong>in</strong>gelse. In practice, almost any program of any size will use libraries that aren’tstandardized—W<strong>in</strong>dows Forms or ASP.NET, for <strong>in</strong>stance. The Mono project has itsown libraries that are not part of .NET as well, of course, such as GTK#, <strong>in</strong> addition toimplement<strong>in</strong>g many of the nonstandardized libraries.The term .NET refers to the comb<strong>in</strong>ation of the runtime and libraries provided byMicrosoft, and it also <strong>in</strong>cludes compilers for <strong>C#</strong> and VB.NET. It can be seen as a wholedevelopment platform built on top of W<strong>in</strong>dows.Now that we know what term means what, we can look at different versions availableof each. The subject of the version numbers chosen by Microsoft and what’s <strong>in</strong>which version is a slightly convoluted one, but it’s important that we all agree on whatwe mean when we talk about a particular version.1.3.2 Untangl<strong>in</strong>g version number chaosA newcomer to the <strong>in</strong>dustry might th<strong>in</strong>k that com<strong>in</strong>g up with version numbers wouldbe easy. You start with 1, then move on to 2, then 3 <strong>in</strong> a logical progression, right? If onlythat were the case… Software products and projects of all natures like to keep m<strong>in</strong>orversion changes dist<strong>in</strong>ct from major ones, and then there are patch levels, service packs,build numbers, and so forth. In addition, there are the codenames, which are widely usedand then abandoned, much to the frustration of “bleed<strong>in</strong>g edge” book authors andpublishers. Fortunately from the po<strong>in</strong>t of view of <strong>C#</strong> as a language we can make life reasonablystraightforward.NOTEKeep<strong>in</strong>g it simple: <strong>C#</strong> 1, <strong>C#</strong> 2, and <strong>C#</strong> 3—Throughout this book, I’ll refer to<strong>C#</strong> versions as just 1, 2, and 3. There’s little po<strong>in</strong>t <strong>in</strong> dist<strong>in</strong>guish<strong>in</strong>gbetween the two 1.x versions, and no po<strong>in</strong>t <strong>in</strong> add<strong>in</strong>g a cumbersomeextra “.0” every time I refer to the different versions—which of course I’llbe do<strong>in</strong>g quite a lot.We don’t just need to keep track of the language, unfortunately. There are five th<strong>in</strong>gswe’re <strong>in</strong>terested <strong>in</strong>, when it comes to version<strong>in</strong>g.■■■The .NET FrameworkFramework librariesThe CLRLicensed to Rhona Hadida

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!