Build Robust, Performant, and Efficient Programs
Steve Love

#C#
#Type
🚀 قدرت سیستم تایپ C# رو به خدمت بگیر تا برنامههایی بنویسی که شفافتر، سادهتر و خیلی بهینهتر باشن.
💎 سیستم تایپ همون فونداسیونیه که تمام برنامههای C# روی اون بنا میشن. این کتاب بهت یاد میده چجوری Value Typeها رو به شکلی موثر تعریف و پیادهسازی کنی تا کدات هم پرفورمنس بالاتری داشته باشن و هم در برابر باگ مقاومتر بشن. استفاده از مثالهای دنیای واقعی و تستکیسها باعث میشه این اصول رو عمیق یاد بگیری.
✨ ویژگیهای کلیدی
• یاد میگیری چجوری Value Typeهای شخصیسازی شده میتونن خوانایی کد رو به شدت بالا ببرن.
• درک تفاوتهای عمیق بین Reference Types و Value Types در حافظه و نحوه مدیریت اونها.
• بررسی رفتار کپی شدن (Copy Semantics) و تاثیری که روی خروجی نهایی برنامه میذاره.
• فهم دقیق نحوه کارکرد متدهای مقایسهای برای چک کردن برابری در پشت صحنه.
• تحلیل اینکه چرا ارثبری برای Value Typeها انتخاب مناسبی نیست.
• ابزارهایی برای اندازهگیری و ارزیابی پرفورمنس کد موقع استفاده از دیتا تایپهای مختلف.
🎯 این کتاب برای چه کسانی مناسبه؟
فرقی نمیکنه تازهکار باشی یا یه برنامهنویس باسابقه؛ اگه میخوای کد "خوب" رو به کد "عالی" تبدیل کنی و بفهمی زیر کاپوت داتنت چه خبره، این کتاب برات ضروریه.
📑 فهرست مطالب
1 استفاده حداکثری از سیستم تایپ
2 نوعهای مقداری و مرجعی (Value and Reference Types)
3 پارامترهای مرجعی و مقداری
4 کپی کردن ضمنی و صریح
5 انواع برابری (Equality)
6 ماهیت مقادیر
7 نوعهای مقداری و پلیمورفیسم
8 کارایی و بهینهسازی
💡 درباره نویسنده
• استیو لاو (Steve Love) نزدیک به ۲۰ ساله که توسعهدهنده حرفهای C# هست و کلی برنامهنویس رو در سطوح مختلف آموزش داده.
• اون نویسنده مجلات معتبری مثل C Vu و Overload هست و توی کنفرانسهای تخصصی زیاد صحبت میکنه؛ این کتاب همون چیزیه که آرزو داشت اول مسیر حرفهایش یکی بهش میداد.
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 to define and implement value types effectively, and write more performant and robust code. Real-world code example sand test cases throughout will elevate your programming with C# and show you how best to implement the principles you’re learning.
Among the core aspects of working with the type system, you’ll learn:
• 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 mere data 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 turn good code into great.
Table of Contents
1. Making the Most of The Type System
2. Value and Reference Types
3. Reference and Value Parameters
4. Implicit and Explicit Copying
5. Types Of Equality
6. The Nature of Values
7. Value Types and Polymorphism
8. Performance And Efficiency
About the Author
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.









