Jump to ratings and reviews
Rate this book

The C# Type System

Rate this book
Harness the power of the C# type system to write programs that are clearer, simpler, and more efficient.

The type system is the foundation upon which all C# programs are built. The C# Type System will show you how todefine and implement value types effectively, and write more performant and robust code. Real-world code examplesand test cases throughout will elevate your programming with C# and show you how best to implement the principlesyou’re learning.

Among the core aspects of working with the type system, you’ll

• How user-defined value types, and even simple types, can enhance your code’s readability
• How reference and value types differ within C#
• How method parameters and arguments relate to reference and value types
• How differences in copy semantics between value and reference types affect a program’s behavior
• How the different methods of value comparisons for equality work behind the scenes
• The unique characteristics and roles of various types in an application, especially how value types go beyond meredata storage
• Why inheritance isn’t optimal for value types
• How to measure and evaluate the performance of an app’s use of different data types

Whether you’re a novice or seasoned programmer, you’ll find The C# Type System indispensable in your efforts to turngood code into great.

344 pages, Paperback

Published October 31, 2023

3 people are currently reading
18 people want to read

About the author

Steve Love

1 book

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (100%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 2 of 2 reviews
Profile Image for Ben.
2,739 reviews236 followers
January 9, 2024
One Type, One System

This was a great book on the look of the C# Type System.

Being mostly a C# developer myself, I got a lot out of this, and quite enjoyed it.

I really love the writing of this book, and found it was filled with great examples and code snippets to really solidify the learning and give concrete examples of the ideas.

Definitely check it out if you too are a full-stack developer!

4.8/5
7 reviews
July 7, 2024
It is a fantastic book and even though I have worked in .NET for more than 10 years, I learnt a lot. The book targets intermediate and advanced developers in C# and can give them a lot. After reading the introduction, I wondered what is so hard on structs deserving writing a whole book, I quickly realized that it is not so easy and there are a lot of non-obvious aspects which I was not aware of before. Slightly later, I realized that this book is full of these and it is very interesting reading.

While I thought that the book purely targets performance, the book targets more code quality and readability instead. But still, performance is mentioned frequently in the book and the latest chapter is almost purely performance-oriented. The author stays above the water rather than going to the deep internals. While there were few IL code samples, the vast majority of the book describes features and behaviours from an intuitive high-level point of view.

The book showcases modern C# syntax sugars, but the author does not assume their knowledge and always explains them even if they are unrelated to the main topic, which was helpful for me. If you are conservative and do not use them much, you will learn them along the way.

The content of the book is fantastic but slightly repeating. Several statements and best practices repeat in multiple chapters several times. The author most probably designed the book for reading chapters in random access fashion, but still, I read it from cover to cover and frequently I felt that I read something which I read already before. Except that, I like the writing style.

Fantastic is the Further reading section at the end of the book. 9 pages of links to interesting blogs and documentation.

The book is fantastic and I recommend it to everyone who seriously develops in C#. Definitely, it is a 5-star book.
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.