The C# Player's Guide (2nd Edition) is the ultimate guide for people starting out with C#, whether you are new to programming, or an experienced vet. This guide takes you from your journey's beginning, through the most challenging parts of programming in C#, and does so in a way that is casual, informative, and fun.
This version of the book is updated for C# 6.0, .NET 4.6, and Visual Studio 2015
- Get off the ground quickly, with a gentle introduction to C#, Visual Studio, and a step-by-step walkthrough and explanation of how to make your first C# program.
- Learn the fundamentals of procedural programming, including variables, math operations, decision making, looping, methods, and an in-depth look at the C# type system.
- Delve into object-oriented programming, from start to finish, including inheritance, polymorphism, interfaces, and generics.
- Explore some of the most useful advanced features of C#, and take on some of the most common tasks that a programmer will tackle.
- Learn to control the tools and tricks of programming in C#, including the .NET framework, dealing with compiler errors, and hunting down bugs in your program.
- Master the needed skills by taking on a large collection of Try It Out! challenges, to ensure that you've learned the things you need to.
With this guide, you'll soon be off to save the world (or take over it) with your own awesome C# programs!
Table of Contents
Part 1: Getting Started
Chapter 1. The C# Programming Language
Chapter 2. Installing Visual Studio
Chapter 3. Hello World: Your First C# Program
Chapter 4. Comments
Part 2: The Basics
Chapter 5. Variables
Chapter 6. The C# Type System
Chapter 7. Basic Math
Chapter 8. User Input
Chapter 9. More Math
Chapter 10. Decision Making
Chapter 11. Switch Statements
Chapter 12. Looping
Chapter 13. Arrays
Chapter 14. Enumerations
Chapter 15. Methods
Chapter 16. Value and Reference Types
Part 3: Object-Oriented Programming
Chapter 17. Classes and Objects
Chapter 18. Making Your Own Classes
Chapter 19. Properties
Chapter 20. Structs
Chapter 21. Inheritance
Chapter 22. Polymorphism, Virtual Methods, and Abstract Classes
Chapter 23. Interfaces
Chapter 24. Using Generics
Chapter 25. Making Generic Types
Part 4: Advanced Topics
Chapter 26. Namespaces and Using Directives
Chapter 27. Methods Revisited
Chapter 28. Reading and Writing Files
Chapter 29. Error Handling and Exceptions
Chapter 30. Delegates
Chapter 31. Events
Chapter 32. Operator Overloading
Chapter 33. Indexers
Chapter 34. Extension Methods
Chapter 35. Lambda Expressions
Chapter 36. Query Expressions
Chapter 37. Threads
Chapter 38. Asynchronous Programming
Chapter 39. Other Features in C#
Part 5: Mastering the Tools
Chapter 40. C# and the .NET Framework
Chapter 41. Getting the Most from Visual Studio
Chapter 42. Referencing Other Projects
Chapter 43. Handling Common Compiler Errors
Chapter 44. Debugging Your Code
Chapter 45. How Your Project Files are Organized
Part 6: Wrapping Up
Chapter 46. Try It Out!
Chapter 47. What’s Next?