Cover of Modern C#

Modern C#

Mastering the Type System
by Steve Love
August 2023, 256 pp.
ISBN-13: 
9781718501584
Use coupon code PREORDER to get 25% off!

Download Chapter 2: COMPARING VALUE TYPES AND REFERENCE TYPES

Look Inside!

Modern C# pages 38-39Modern C# pages 62-63Modern C# pages 80-81Modern C# pages 196-197

 

Modern C# will improve your professional coding skills by giving you a deep look into C#, one of the most popular programming languages in use today. By exploring the intricacies of the C# type system, you’ll make best use of fundamental aspects of the language, including types and references, lifetimes and scope, mutability and inheritance, and memory and storage. You’ll also learn to identify common pitfalls and misunderstandings, like knowing when a value is stored on a heap and when it’s on the stack, or when a reference is actually a copy. The author provides plenty of working code examples throughout the book, making it a handy technical guide that you can directly apply in your work. 

 

This book will help you:

  • Know the key differences between value and reference types, and when to use what
  • Understand C# memory and object models to write more efficient programs
  • Use classes, structs, and records accurately and appropriately  
  • Create effective custom types for specific use-cases 
  • Navigate concepts like inheritance, mutability, and memory storage with confidence
  • Use embedded types to make your code safer and more readable

By learning how core aspects of the language work, you can make informed decisions in your problem-solving, and skilfully program modern, professional C# code with confidence.

 

Author Bio 

Steve Love has been a professional C# developer for nearly 20 years, and has trained many other C# developers of varying levels of expertise. He writes for the ACCU magazines C Vu and Overload, and is a frequent speaker at conferences. This is the book he wishes he’d had early in his career.

Table of contents 

Introduction
Chapter 1: Making the Most of the Type System
Chapter 2: Comparing Value Types and Reference Types
Chapter 3: Reference Parameters and Value Parameters
Chapter 4: Implicit and Explicit Copying
Chapter 5: Many Ways to Be Equal
Chapter 6: The Nature of Values
Chapter 7: Value Types and Polymorphism
Chapter 8: Performance and Efficiency
Conclusion

The chapters in red are included in this Early Access PDF.