<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>C-Sharp on ByteCrafted</title>
    <link>https://bytecrafted.dev/tags/c-sharp/</link>
    <description>Recent content in C-Sharp on ByteCrafted</description>
    <image>
      <title>ByteCrafted</title>
      <url>https://bytecrafted.dev/favicons/android-chrome-512x512.png</url>
      <link>https://bytecrafted.dev/favicons/android-chrome-512x512.png</link>
    </image>
    <generator>Hugo -- 0.155.2</generator>
    <language>en</language>
    <lastBuildDate>Tue, 25 Nov 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://bytecrafted.dev/tags/c-sharp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Stop Asking Your Objects Questions. Just Tell Them What to Do</title>
      <link>https://bytecrafted.dev/clean-code-csharp-beyond-solid/tell-dont-ask-principle/</link>
      <pubDate>Tue, 18 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/clean-code-csharp-beyond-solid/tell-dont-ask-principle/</guid>
      <description>Learn how the &amp;#39;Tell, Don&amp;#39;t Ask&amp;#39; principle eliminates behavioral dependencies in C# applications. Discover practical examples, common pitfalls, and refactoring techniques for cleaner code.</description>
    </item>
    <item>
      <title>The Clean Code Rules I Wish I Knew Sooner (Beyond SOLID)</title>
      <link>https://bytecrafted.dev/clean-code-csharp-beyond-solid/</link>
      <pubDate>Tue, 28 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/clean-code-csharp-beyond-solid/</guid>
      <description>Go beyond SOLID with a senior dev&amp;#39;s guide to clean C#. This post covers 22 principles like &amp;#34;Tell, Don&amp;#39;t Ask&amp;#34; and &amp;#34;Fail Fast&amp;#34; to help you write better C# code.</description>
    </item>
    <item>
      <title>IAsyncEnumerable vs Task.WhenAll: Choosing Between Speed and User Experience in C#</title>
      <link>https://bytecrafted.dev/posts/c-sharp/iasyncenumerable-vs-task-whenall/</link>
      <pubDate>Thu, 16 Oct 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/iasyncenumerable-vs-task-whenall/</guid>
      <description>Benchmarked comparison of IAsyncEnumerable vs Task.WhenAll in C#. Task.WhenAll is 10-40x faster, but IAsyncEnumerable provides better user experience, memory efficiency, and error resilience for streaming scenarios.</description>
    </item>
    <item>
      <title>Why Copy-Paste Coding Is Worse Than You Think</title>
      <link>https://bytecrafted.dev/copy-paste-coding-worse-than-you-think/</link>
      <pubDate>Tue, 07 Oct 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/copy-paste-coding-worse-than-you-think/</guid>
      <description>Learn why copy-paste coding creates subtle bugs and technical debt. Explore safer alternatives like generics, helpers, and proper inheritance in C#.</description>
    </item>
    <item>
      <title>EF Core Interceptors for Secure, Per-Tenant Audit Logging</title>
      <link>https://bytecrafted.dev/ef-core-saas-audit-logging-savechanges-interceptors/</link>
      <pubDate>Fri, 03 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/ef-core-saas-audit-logging-savechanges-interceptors/</guid>
      <description>Use EF Core Interceptors to automatically create isolated, per-tenant audit logs. A practical, production-ready guide for securing .NET SaaS applications.</description>
    </item>
    <item>
      <title>Why I Avoid Static Helpers in Modern C# Projects</title>
      <link>https://bytecrafted.dev/avoid-static-helpers-csharp/</link>
      <pubDate>Tue, 30 Sep 2025 09:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/avoid-static-helpers-csharp/</guid>
      <description>Static helper classes in C# look convenient, but they cause tight coupling, testing headaches, and global state issues. Here’s why I avoid them in modern .NET projects and what I do instead.</description>
    </item>
    <item>
      <title>5 ASP.NET Core DI Scope Mistakes Developers Must Avoid</title>
      <link>https://bytecrafted.dev/aspnet-core-di-scope-mistakes/</link>
      <pubDate>Fri, 26 Sep 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/aspnet-core-di-scope-mistakes/</guid>
      <description>Avoid common ASP.NET Core DI scope mistakes like DbContext misuse, singleton leaks, and middleware bugs with practical production fixes.</description>
    </item>
    <item>
      <title>12 SOLID Interview Questions for Experienced Developers</title>
      <link>https://bytecrafted.dev/solid-principles-interview-questions/</link>
      <pubDate>Mon, 08 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/solid-principles-interview-questions/</guid>
      <description>Boost your interview readiness with 12 essential SOLID principle questions for experienced developers focused on architecture and maintainable code.
</description>
    </item>
    <item>
      <title>SOLID Principles Cheatsheet</title>
      <link>https://bytecrafted.dev/solid-principles-cheatsheet/</link>
      <pubDate>Tue, 12 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/solid-principles-cheatsheet/</guid>
      <description>A real-world SOLID principles cheatsheet for C# developers.</description>
    </item>
    <item>
      <title>Why Async Can Be Slower in Real Projects?</title>
      <link>https://bytecrafted.dev/csharp-async-await-scalability-vs-speed/</link>
      <pubDate>Fri, 01 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/csharp-async-await-scalability-vs-speed/</guid>
      <description>Think async is always better? In real C# projects, it can slow APIs, exhaust threads, and hurt scalability. Learn when to avoid it.</description>
    </item>
    <item>
      <title>Dependency Inversion: Boost C# Code Quality</title>
      <link>https://bytecrafted.dev/series/solid/dependency-inversion-csharp-testable-maintainable-code/</link>
      <pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/series/solid/dependency-inversion-csharp-testable-maintainable-code/</guid>
      <description>Master Dependency Inversion in C# to improve code quality, reduce coupling, and build flexible, maintainable, and scalable applications</description>
    </item>
    <item>
      <title>Interface Segregation Principle: No Unused Methods</title>
      <link>https://bytecrafted.dev/series/solid/interface-segregation-principle-unused-methods/</link>
      <pubDate>Fri, 18 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/series/solid/interface-segregation-principle-unused-methods/</guid>
      <description>ISP explained: Avoid unused methods in C# interfaces to create cleaner, more modular, and maintainable applications that follow solid design principles.
</description>
    </item>
    <item>
      <title>Top 11 EF Core Mistakes That Kill Performance</title>
      <link>https://bytecrafted.dev/posts/ef-core/performance-mistakes/</link>
      <pubDate>Thu, 17 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/ef-core/performance-mistakes/</guid>
      <description>Avoid common EF Core mistakes that hurt performance. Learn 11 practical fixes to optimize queries, reduce load, and improve .NET app efficiency.</description>
    </item>
    <item>
      <title>Prefer Interfaces Over Abstract Classes in C#</title>
      <link>https://bytecrafted.dev/posts/c-sharp/prefer-interfaces-over-abstract-classes/</link>
      <pubDate>Wed, 16 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/prefer-interfaces-over-abstract-classes/</guid>
      <description>Learn why preferring interfaces over abstract classes in C# improves code flexibility, testability, and maintainability for robust .NET applications.</description>
    </item>
    <item>
      <title>C# IEquatable: Custom Equality for .NET Devs</title>
      <link>https://bytecrafted.dev/posts/c-sharp/iequatable-guide/</link>
      <pubDate>Wed, 16 Jul 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/iequatable-guide/</guid>
      <description>IEquatable in C#: Learn custom equality implementation to enhance .NET code quality, maintainability, and correctness in real-world projects.</description>
    </item>
    <item>
      <title>C# Polymorphism with Template, Strategy, Visitor</title>
      <link>https://bytecrafted.dev/posts/software-design/polymorphism-template-strategy-visitor/</link>
      <pubDate>Wed, 16 Jul 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/software-design/polymorphism-template-strategy-visitor/</guid>
      <description>Learn how polymorphism in C# powers real-world patterns like Template Method, Strategy, and Visitor to write cleaner, extensible, and testable code.</description>
    </item>
    <item>
      <title>C# Interfaces: Default Methods for Compatibility</title>
      <link>https://bytecrafted.dev/posts/c-sharp/default-interface-methods/</link>
      <pubDate>Tue, 15 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/default-interface-methods/</guid>
      <description>Learn C# default interface methods to build future-proof, backward-compatible APIs that are maintainable, flexible, and ready for modern applications.</description>
    </item>
    <item>
      <title>Square-Rectangle Problem: Lessons on Liskov Substitution</title>
      <link>https://bytecrafted.dev/series/solid/rectangle-square-problem-liskov-substitution-principle/</link>
      <pubDate>Mon, 14 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/series/solid/rectangle-square-problem-liskov-substitution-principle/</guid>
      <description>Understand the Rectangle-Square problem in C# and how it reveals common violations of the Liskov Substitution Principle (LSP) in object-oriented design.</description>
    </item>
    <item>
      <title>Dependency Inversion in C#: Flexible Code with ASP.NET Core</title>
      <link>https://bytecrafted.dev/posts/aspnet-core/dependency-inversion-principle-aspnet-core-di/</link>
      <pubDate>Sun, 13 Jul 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/aspnet-core/dependency-inversion-principle-aspnet-core-di/</guid>
      <description>Learn the Dependency Inversion Principle in C# with ASP.NET Core DI to write flexible, maintainable, and testable code for real-world applications.</description>
    </item>
    <item>
      <title>Encapsulation Best Practices in C#: Controlled Setters vs Backing Fields</title>
      <link>https://bytecrafted.dev/posts/c-sharp/encapsulation-best-practices/</link>
      <pubDate>Sat, 12 Jul 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/encapsulation-best-practices/</guid>
      <description>Learn when to use auto-properties vs backing fields in C#. See best practices for encapsulation, validation, and business logic in property setters, with real-world code examples and a quick comparison table.</description>
    </item>
    <item>
      <title>Open-Closed Principle: Smart Use, No Overkill
</title>
      <link>https://bytecrafted.dev/series/solid/open-closed-principle-without-overengineering/</link>
      <pubDate>Fri, 11 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/series/solid/open-closed-principle-without-overengineering/</guid>
      <description>OCP guide: Use the Open-Closed Principle smartly in C# to create flexible, maintainable code without overcomplicating with plugins.
</description>
    </item>
    <item>
      <title>Avoiding N&#43;1 Queries in EF Core: Include() vs SplitQuery()</title>
      <link>https://bytecrafted.dev/posts/ef-core/n-plus-one-include-vs-splitquery/</link>
      <pubDate>Tue, 08 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/ef-core/n-plus-one-include-vs-splitquery/</guid>
      <description>Learn how to avoid the N&#43;1 query problem in Entity Framework Core using Include() and AsSplitQuery(). Improve your application&amp;#39;s performance with practical examples and tips.</description>
    </item>
    <item>
      <title>Single Responsibility Principle: One Reason to Change
</title>
      <link>https://bytecrafted.dev/series/solid/single-responsibility-principle-single-reason-to-change/</link>
      <pubDate>Mon, 07 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/series/solid/single-responsibility-principle-single-reason-to-change/</guid>
      <description>Discover the true meaning of “One Reason to Change” in SRP to write cleaner, more maintainable, and flexible C# applications.</description>
    </item>
    <item>
      <title>Avoiding Boxing with Struct Dictionary Keys in C#: Performance and Best Practices</title>
      <link>https://bytecrafted.dev/posts/c-sharp/avoiding-boxing-struct-dictionary-keys/</link>
      <pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/avoiding-boxing-struct-dictionary-keys/</guid>
      <description>Learn how to avoid hidden heap allocations when using structs as dictionary keys in C#. See why boxing happens, how to implement IEquatable&amp;lt;T&amp;gt;, and the benefits of readonly and record structs for high-performance code.</description>
    </item>
    <item>
      <title>Guard Clauses in C#: Cleaner Validation and Fail-Fast Code</title>
      <link>https://bytecrafted.dev/posts/c-sharp/guard-clauses-csharp-clean-validation/</link>
      <pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/guard-clauses-csharp-clean-validation/</guid>
      <description>Learn how to use guard clauses in C# for cleaner validation and error handling. See practical examples, reusable helpers, and best practices for writing fail-fast, maintainable code.</description>
    </item>
    <item>
      <title>Efficient High-Volume File Processing in C#</title>
      <link>https://bytecrafted.dev/posts/c-sharp/efficient-parallel-file-processing-csharp/</link>
      <pubDate>Fri, 04 Jul 2025 00:00:00 +0030</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/efficient-parallel-file-processing-csharp/</guid>
      <description>Discover efficient C# patterns for processing large numbers of files, ensuring performance, reliability, and scalability in high-volume workloads.</description>
    </item>
    <item>
      <title>C#: Abstract Class or Interface? 10 Questions to Ask</title>
      <link>https://bytecrafted.dev/posts/c-sharp/interfaces-vs-abstract-questions/</link>
      <pubDate>Tue, 01 Jul 2025 10:10:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/interfaces-vs-abstract-questions/</guid>
      <description>10 real-world questions comparing abstract classes and interfaces in C#. Perfect for designing APIs, architectures, and preparing for interviews.</description>
    </item>
    <item>
      <title>How Does Composition Support the SOLID Principles? (C# Examples &amp; Best Practices)</title>
      <link>https://bytecrafted.dev/posts/software-design/composition-supports-solid-principles/</link>
      <pubDate>Mon, 30 Jun 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/software-design/composition-supports-solid-principles/</guid>
      <description>Learn how composition naturally enforces the SOLID principles in C#. This guide explains each SOLID principle with real-world code examples, showing why composition leads to cleaner, more maintainable, and testable code than inheritance.</description>
    </item>
    <item>
      <title>Composition Over Inheritance in C#</title>
      <link>https://bytecrafted.dev/posts/software-design/composition-over-inheritance/</link>
      <pubDate>Sun, 29 Jun 2025 00:00:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/software-design/composition-over-inheritance/</guid>
      <description>Learn why composition is preferred over inheritance in C# to write flexible, maintainable, and scalable code that follows clean design principles.</description>
    </item>
    <item>
      <title>Handle Request Cancellation in ASP.NET Core</title>
      <link>https://bytecrafted.dev/posts/aspnet-core/handling-request-cancellation/</link>
      <pubDate>Sun, 22 Jun 2025 02:30:00 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/aspnet-core/handling-request-cancellation/</guid>
      <description>Learn how to handle request cancellation in ASP.NET Core, from browser to database, ensuring responsive, reliable, and efficient applications.</description>
    </item>
    <item>
      <title>C# 14&#39;s params for Collections: Say Goodbye to Arrays!</title>
      <link>https://bytecrafted.dev/posts/c-sharp/csharp-14-params-collections-performance-benefits/</link>
      <pubDate>Sat, 21 Jun 2025 02:30:20 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/csharp-14-params-collections-performance-benefits/</guid>
      <description>Discover how C# 14 extends the params keyword beyond arrays to support `IEnumerable&amp;lt;T&amp;gt;`, `Span&amp;lt;T&amp;gt;`, and other collections, bringing better performance, reduced memory allocations, and more flexible API design.</description>
    </item>
    <item>
      <title>5 Essential Benefits of Immutability in C# Programming</title>
      <link>https://bytecrafted.dev/posts/c-sharp/benefits-of-immutability-csharp/</link>
      <pubDate>Fri, 20 Jun 2025 02:30:20 +0530</pubDate>
      <guid>https://bytecrafted.dev/posts/c-sharp/benefits-of-immutability-csharp/</guid>
      <description>Discover why immutable objects are a powerful tool in C# development. Learn how immutability delivers thread safety, predictable behavior, better performance, and simplified debugging with practical code examples.</description>
    </item>
    <item>
      <title>C# Constructor Chaining - Why It Matters for Clean Code</title>
      <link>https://bytecrafted.dev/csharp-constructor-chaining-clean-code/</link>
      <pubDate>Fri, 20 Jun 2025 02:30:20 +0530</pubDate>
      <guid>https://bytecrafted.dev/csharp-constructor-chaining-clean-code/</guid>
      <description>Constructor chaining C# prevents code duplication. Learn when to use C# constructor overloading vs optional parameters with practical examples.</description>
    </item>
    <item>
      <title>C# Deadlock: 5 Proven Ways to Prevent and Debug Them</title>
      <link>https://bytecrafted.dev/csharp-deadlock-causes-prevention/</link>
      <pubDate>Fri, 20 Jun 2025 02:30:20 +0530</pubDate>
      <guid>https://bytecrafted.dev/csharp-deadlock-causes-prevention/</guid>
      <description>Struggling with a frozen C# application? A deadlock might be the cause. Learn 5 proven patterns to prevent, find, and fix deadlocks in your code today.</description>
    </item>
  </channel>
</rss>
