Learn it from developers who built it.
Tutorials, how-tos and deep dives on AI, .NET, C#, cloud and developer tools, written by the community.
This article explores five methods for converting a C# POCO to a dictionary using reflection, LINQ, JSON libraries, and ExpandoObject, comparing their performance through Benchmark.NET to find the best approach.

An indexer in C# allows objects to be indexed like arrays, enabling access to elements using an index. It’s defined with this keyword and can be used to encapsulate data access in a class or struct. Indexers enhance the flexibility and readability of code by simplifying element retrieval and storage.

In C#, Action, and Func are generic delegates used to handle methods. Action is used for methods that don't return a value, while Func returns a value. Action<int> executes a method with an integer parameter without returning a result. Func<int, int> takes an integer, performs an operation, and returns the result.

In C#, the Action delegate represents a method that does not return a value and can accept up to 16 parameters. It's useful for passing methods as arguments, callbacks, and event handling. It supports lambda expressions and anonymous methods, making code more concise. Unlike Func<T>, Action always returns void.

In C#, the switch statement serves as a control structure that enables the execution of distinct code blocks based on the value of a variable. It is frequently utilized when there is a need to compare a variable with multiple constant values and to carry out various actions according to the outcome.

A copy constructor in C# allows creating a new object by copying an existing object. It duplicates the values of properties and fields from the original object. This method is useful for creating independent object copies, enhancing code readability, and managing object duplication efficiently.

Learn how to work with FTP (File Transfer Protocol) using C# in this comprehensive guide. Explore how to connect to FTP servers, upload and download files, and manage file transfers programmatically.

This article describes how to implement serialization and deserialization using Protobuf-net.dll. This article explores Protobuf-net, a .NET library for efficient serialization and deserialization using Google's Protocol Buffers.

The primary constructor in C# 12 introduces a new way to define and initialize properties directly within the class declaration, simplifying object creation and reducing boilerplate code.

In this article, we will learn how to implement this pattern in your C# code, improve code reusability, and follow best practices for more maintainable and flexible software design.

Find out how Ziggy Rafiq simplifies A/B testing with feature toggles in C# 12 by using Factory and Abstract Factory design patterns.

This article explores the implementation of 10 common searching algorithms in C#, detailing their use cases, workings, and complexities. From simple linear searches to more complex algorithms like Binary Search, Jump Search, and KMP, this guide provides code examples and insights into optimizing search efficiency.

Domain-driven design is a software development approach that closely aligns software models with business needs. It focuses on key concepts like Entities, Value Objects, Aggregates, and Aggregate Roots to ensure consistency, integrity, and scalability in complex systems by structuring code around the business domain.

This guide covers the principles of object-oriented programming, including inheritance and polymorphism, and demonstrates practical techniques for effective interface re-implementation and code refactoring.

This guide explores essential C# best practices for robust, maintainable code. It covers using meaningful variable names, following naming conventions, handling null values, and using var judiciously.

In this detailed article by Ziggy Rafiq, you will learn how to implement key components like AbstractFactory, ConcreteFactory, AbstractProduct, and ConcreteProduct in .NET Core with C# 12. By leveraging the modern features of C# 12 and .NET Core, this pattern enhances flexibility and scalability in software development.

This article details creating a `StringUtils` utility class in Java to centralize common string operations. It covers methods for checking if a string is alphanumeric with underscores or consists solely of letters, enhancing code organization and reusability.

Learn how to create a custom message box in a Windows Forms application using C#. This step-by-step guide covers everything from designing the message box to implementing it in your WinForms project.

This guide explains how DIP enhances software design by decoupling high-level and low-level modules, promoting flexibility and maintainability. Understand its implementation using Dependency Injection and best practices in C#.

This article explains C# basics with C# code examples including C# data types, class, objects, properties, and methods. You'll also learn basic OOP concepts such as overloading, polymorphism, abstraction, and interfaces. The article also covers common iteration statements including for, while, do while, and foreach.

In multi-threaded C# programming, the lock statement ensures that critical code sections are accessed by only one thread at a time. While lock(this) locks on the current instance, it can expose your object to external locking, leading to potential deadlocks.

The [Flags] attribute in C# allows an enum to represent a combination of values using bitwise operations. This is useful when an enum needs to store multiple values simultaneously. By applying [Flags], enum members can be combined using bitwise OR, and specific values can be checked with bitwise AND or HasFlag.

Explore the Interface Segregation Principle (ISP) from SOLID design principles to ensure code flexibility and maintainability. ISP advocates for breaking down large, unwieldy interfaces into smaller, client-specific ones, reducing unnecessary dependencies. Learn how to apply this principle with practical examples in C#.

An in-depth look at performance enhancements, language improvements, and new libraries in this comprehensive article by Ziggy Rafiq.

This guide explores the detailed use of Tuples and ValueTuples in C#. It covers their differences, how to create and manipulate them, and practical examples for implementing them in real-world applications.

In this article we can learn how to make our own QR code. Make a QR report using RDLC reports with preview condition.

Learn how records differ from classes, their advantages in creating immutable types, and how they enhance object initialization, equality checks, and more in .NET applications.

The Liskov Substitution Principle (LSP) ensures that objects of a base class can be replaced with objects of a derived class without altering program correctness. This principle, part of SOLID design, promotes reliable and maintainable code by maintaining consistent behavior across class hierarchies.

Server-Sent Events (SSE) in C# .NET enable real-time, one-way communication from server to client over HTTP, ideal for live updates like notifications or data streaming. Unlike WebSockets, SSE is simpler, requiring only server-side implementation.

This article explores how the yield return statement in C# can simplify iteration logic and enhance code quality. By allowing deferred execution and creating custom iterators, developers can write more efficient and readable code.
Everything on C#, not only its articles: the C# page →
DevSocialUpcoming · 3rd editionAI Agents ConferenceNov 23–27, 2026Live onlineMembers only16days leftRegisterMembers onlyWrite an article and earn +1,000 SHARP when it is approved.
Write an article