20-12-2012, 03:32 PM
Visual C# .NET Programming
1C# .NET.pdf (Size: 7.61 MB / Downloads: 185)
Introduction
I dreamed that black-clad horsemen pursued me down a lonely road. The hoofs of their steeds
rang with urgent clanks on the paving stones. I turned to look at my pursuers and saw fiery
red-rimmed eyes fixed within deathly pale faces. A sword was raised, and as it swept down…
No, that's not the way it goes at all.
I dreamed of a city far in the future. Sentient machines performed all menial labor, so there
was plenty of time for science and art. But all was not well in paradise. Regimentation begat
alienation, and alienation begat a class of cyber-hackers who had dropped out of known
society and lived in caves far from the city.
That's a little closer, but we're not quite there yet! Let's try again.
I dreamed of a pure programming language, so sweet and tender, yet flexible and strong. This
language, named after a musical note, incorporated the best features of other languages and
also made available an extremely potent library of classes. You guessed it: the language is C#,
and the library of classes the .NET Framework. This dream is true!
This is a different kind of book about a programming language. The conventional thing is to
begin with syntax and semantics, proceed through user interfaces and object orientation, and
end with various applications. But why be conventional? This book does not do the standard
thing.
The Structure of This Book: About the Musical Part
Names
Since C# is a programming language named after a musical note, I thought it appropriate to
involve musical concepts when structuring this book. In keeping with this, I've named each
of the four parts of the book after movements in a classical composition. These movementsprelude,
allemande, courante, and gigue-primarily are found in Baroque music. Musical
scholars should note that I have not been compulsive about the accuracy or consistency of the
musical metaphor. The point really is the metaphor and how it relates to the structure of this
book and to programming in C#.
The structure of the book is essentially spiral, like a chambered nautilus shell or the pattern in
this volume's cover photograph of a Zen garden. By the end of the book, readers will be able
to comprehend and accomplish things that seemed shadowy and mysterious when they
plunged in at the beginning. Each of the four parts represents a different stage in this quest for
skills and understanding.
Prelude-Service with a Smile
In classical music, the prelude introduces the work. Often composed in a free-flowing style, it
sets the mood and mode for the rest of the work and is designed to pique the interest of the
audience. It can contain references to ideas that are delivered later-foreshadowings, a taste
of things to come. The themes in the prelude are not whole ideas but snippets, motifs-just
enough to whet the appetite and make the listener want more. These motifs are pre-echoesnot
déjà vu, which are vague memories of things already seen, but rather premonitions of
things to come. If you listen to the composition more than once, then in the prelude you
should be able to begin to hear the pattern of the entire piece.
At the same time that a prelude introduces the larger work; it is an organic unit in and of
itself, with a beginning, middle, and end. This cohesive mini-composition exists within the
larger whole and has its own sense of narrative conflict and resolution, point and
counterpoint, all reconciling in a conclusion that serves as an introduction