Essential C# 2.0 (Microsoft Windows Development Series)

Essential C# 2.0 (Microsoft Windows Development Series)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 720 p.
  • 言語 ENG
  • 商品コード 9780321150776
  • DDC分類 005.133

Full Description


A new edition of this title is available, ISBN-109780321533920"Essential C# 2.0 pulls off a very difficult task. The early chapters are comprehensible by beginning developers, while the later chapters pull no punches and provide the experienced developer with the detailed information they need to make the most of C# 2.0. Starting with the first chapter, Mark has successfully interwoven tidbits of information useful to even the most advanced developer while keeping the book approachable."-Chris Kinsman, chief architect, Vertafore, Microsoft Regional Director "How refreshing! This book deals with C# thoroughly, rather than skimming over the whole .NET framework. It is valuable to newcomers and professionals alike."-Jon Skeet, C# MVP"Essential C# 2.0 is a one-stop shop for an experienced programmer looking to ramp up on one of the hottest languages around today. Mark delivers an intelligent and detailed tour of C#, providing newcomers to the language with a solid foundation of skill on which to build their next generation of applications."-Stephen Toub, technical editor, MSDN Magazine"This book provides complete, up-to-date coverage of all the programming constructs in C#. Masterfully organized, it allows beginning programmers to get on board and leads more experienced programmers into the world of structured programming. Because of its unwavering focus on the essential programming constructs of C#-such as generics, delegates, and much more-this book is indispensable. For programmers who want to solve their day-to-day programming issues using the latest features this modern programming language has to offer, this book is indispensable."-Narendra Poflee, IT integration specialist, Itron Inc."Essential C# 2.0 is an ideal book for all programmers interested in C#. If you are a beginner, you will quickly learn the basics of C# programming and become familiar with the concepts. The flow of the text is easy to follow and does a great job of not repeating concepts that have already been covered. For the experienced programmer, this book has priceless nuggets embedded within its pages, making it a great read for programmers who are already familiar with C#. This will be a book that I will keep next to my computer for years to come."-Michael Stokesbary, software engineer, Itron Inc.Essential C# 2.0 is a clear, concise guide to C#-including the features new to C# 2.0. The book clearly presents material for beginners and experts and provides contrasts and comparisons between C# and other languages. The C# language is covered comprehensively and each important construct is illustrated with succinct code examples. Complete code examples are available online. Mark Michaelis has organized the material for quick access. Graphical "mind maps" at the beginning of each chapter show what material is covered and how each topic relates to the whole.Following the C# introduction, readers will learn aboutC# primitive data types, value types, reference types, type conversions, and arrays Operators and control flow, loops, conditional logic, and sequential programming Methods, parameters, exception handling, and structured programming Classes, inheritance, structures, interfaces, and object-oriented programming Well-formed types, operator overloading, namespaces, and garbage collection Generics, collections, and iterators Reflection, attributes, and declarative programming Threading, synchronization, and multi-threaded patterns Interoperability and unsafe code The Common Language Infrastructure that underlies C#C# 2.0 has a multitude of new features that make the language even more powerful, productive, and efficient. These new features are thoroughly covered in this book. A separate appendix on C# 2.0 topics helps readers quickly find new features of the language.Whether you're just starting out as a programmer, are an experienced developer looking to learn C#, or are a seasoned C# programmer interested in learning the new features of C# 2.0, Essential C# 2.0 gives you just what you need to quickly get up and running writing C# applications.

Contents

Figures xxiTables xxiiiForeword xxvPreface xxviiAcknowledgments xxxixAbout the Author xliChapter 1: Introducing C# 1Hello, World 2C# Syntax Fundamentals 7Working with Variables 14Console Input and Output 18Comments 22Common Intermediate Language and ILDASM 25Chapter 2: Data Types 29Fundamental Numeric Types 30More Fundamental Types 38null and void 49Categories of Types 50Nullable Modifier 53Conversions between Data Types 53Arrays 60Chapter 3: Operators and Control Flow 77Operators 78Introducing Flow Control 92Code Blocks ({}) 99Scope 101Boolean Expressions 102Bitwise Operators (<<, >>, |, &, ^, ‾) 108Control Flow Statements, Continued 113Jump Statements 124C# Preprocessor Directives 130Chapter 4: Methods and Parameters 139Calling a Method 140Declaring a Method 146The using Directive 151Returns and Parameters on Main() 155Parameters 158Recursion 166Method Overloading 169Basic Error Handling with Exceptions 171Chapter 5: Classes 185Defining and Instantiating a Class 189Instance Fields 193Instance Methods 195Using the this Keyword 196Access Modifiers 202Constructors 204Static 211const and readonly Modifiers 218Properties 220Nested Classes 232Partial Classes 234Chapter 6: Inheritance 237Derivation 238Overriding the Base Class 250Abstract Classes 263Everything Ultimately Derives from System.Object 268Verifying the Underlying Type with the is Operator 270Conversion Using the as Operator 271Chapter 7: Interfaces 273Introducing Interfaces 274Polymorphism through Interfaces 275Interface Implementation 279Casting between the Implementing Class and Its Interfaces 284Interface Inheritance 285Multiple Interface Inheritance 287Implementing Multiple Inheritance via Interfaces 288Versioning 291Interfaces Compared with Classes 293Chapter 8: Value Types 297Structs 298Boxing 305Enums 311Chapter 9: Well-Formed Types 323Overriding object Members 323Operator Overloading 334Referencing Other Assemblies 341Defining Namespaces 346XML Comments 349Garbage Collection 353Resource Cleanup 356Chapter 10: Exception Handling 365Multiple Exception Types 365Catching Exceptions 367General Catch Block 368Guidelines for Exception Handling 371Defining Custom Exceptions 373Chapter 11: Generics 379C# without Generics 380Introducing Generic Types 385Constraints 396Generic Methods 409Generic Internals 413Chapter 12: Collections 419Primary Collection Classes 420Introducing Collection Class Interfaces 433Providing an Index Operator 444Returning Null or an Empty Collection 448Iterators 448Chapter 13: Delegates and Events 465Method Pointers 466Multicast Delegates and the Observer Pattern 482Events 496Chapter 14: Reflection and Attributes 509Reflection 510Attributes 520Chapter 15: Multithreading 549Running and Controlling a Separate Thread 552Passing Parameters to Threads 557Thread Pooling 561Unhandled Exceptions 563Synchronization 565Timers 584Chapter 16: Multithreading Patterns 591Asynchronous Results Pattern 592Background Worker Pattern 606Windows Forms 611Chapter 17: Platform Interoperability and Unsafe Code 615Platform Invoke 616Pointers and Addresses 630Chapter 18: The Common Language Infrastructure 641Defining the Common Language Infrastructure (CLI) 642CLI Implementations 643C# Compilation to Machine Code 644Runtime 647Application Domains 652Assemblies, Manifests, and Modules 653Common Intermediate Language (CIL) 656Common Type System (CTS) 656Common Language Specification (CLS) 657Base Class Library (BCL) 658Metadata 658Appendix A: Downloading and Installing the C# Compiler and the CLI Platform 663Appendix B: Complete Source Code Listings 667Appendix C: C# 2.0 Topics 693Index 697