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.
Explore asynchronous programming in C# with a focus on async and await keywords. Learn how to use ConfigureAwait(true/false) to manage context switching and avoid deadlocks.

The Open/Closed Principle (OCP) states that software entities should be open for extension but closed for modification. This principle helps in creating flexible and maintainable code by allowing new functionality to be added without altering existing code.

In this article, we will look into automation of Tortoise SVN activities like checkout, delete, rename on a SVN repository using C# in a console application.

This article explores how to leverage C# records for implementing Data Transfer Objects (DTOs) in .NET. It delves into the benefits of using records for immutable data structures, enhancing code readability, and reducing boilerplate.

This article covers using Func, Action, and local functions in C# 7. It explains how Func returns a value, Action does not, and how local functions can be defined within other methods. Examples include checking for prime numbers, printing the Fibonacci series, and calculating factorials.

Explore how to modernize your C# code by transitioning from traditional switch statements to the more concise and powerful switch expressions introduced in C# 8.0.

In this article, we will discover practical use cases for each, and understand when to choose one over the other in your C# applications to enhance code efficiency and readability.

In software development, validating user input is crucial to prevent errors and security issues. Regular expressions (regex) are used to validate fields such as email, zip codes, and phone numbers. This C# example demonstrates using regex for validation in a Windows Forms app, ensuring data accuracy and security.

Learn three ways to enable C# 7.1 for existing projects: Visual Studio project properties, the csproj LangVersion setting, and the Lightbulb code fix.

Learn how to implement multithreading in C# using the Thread class. This guide covers creating and managing threads, passing parameters, handling exceptions, and using Task for simplified parallelism. Improve your application's performance by understanding these core concepts and techniques.

xploring ValueTask in C#" delves into the intricacies of the ValueTask type introduced in C#. It compares ValueTask with Task, highlighting performance benefits and appropriate use cases.

Learn how to extract only the letters from a string in C# using various methods. This guide covers techniques such as using regular expressions, string manipulation methods, and LINQ to filter out non-letter characters.

Error handling in async code involves using try-catch blocks to manage exceptions, ensuring smooth operation. Task chaining, like a relay race, connects tasks so the result of one task feeds into the next.

In C#, intra-process synchronization involves managing concurrency within a single process using tools like lock, Mutex, and Semaphore. Inter-process synchronization deals with coordination between separate processes using similar mechanisms.

Avoid using `await` inside C# loops as it causes sequential execution and resource contention, leading to poor performance. Instead, use alternatives like `Task.WhenAll`, `Parallel.ForEachAsync`, or `SemaphoreSlim` to handle asynchronous operations concurrently and efficiently.

Unit Testing in ASP.NET Core involves testing individual components or methods to ensure they work as intended. By creating test cases for small functionalities, developers can catch bugs early, improve code quality, and follow TDD principles. Tools like xUnit are used to automate and organize these tests efficiently.

This C# code demonstrates how to mask sensitive numbers, like Aadhar or account numbers. It validates input length, uses StringBuilder to format Aadhar numbers with spaces, and shows account number masking via substring, regex, and string formatting.

Intermediate code optimization in C# improves performance by refining Intermediate Language (IL) code. Techniques like inlining, loop optimizations, dead code elimination, and constant folding enhance runtime efficiency and reduce overhead.

Learn how to implement JWSHMAC in an ASP.NET web application to secure JSON data using HMAC. This guide covers installing the JWT NuGet package, creating a JWT helper class for token generation and validation, and configuring authentication middleware.

In this article, we will Understand key concepts, such as iterator methods and custom iteration patterns, and enhance your C# programming skills with practical examples and tips.

LINQ (Language Integrated Query) is a powerful feature in .NET that allows developers to write SQL-like queries directly in C# or VB.NET. It supports querying collections, XML, databases, and more, using a syntax that integrates seamlessly with the language.

The XOR operator (`^`) in C# is essential for bitwise operations, comparing binary values bit by bit. It is used for tasks like encryption, error detection, and data manipulation.

Sealed classes in C# are a vital concept in object-oriented programming, preventing other classes from inheriting them. This ensures a secure and stable class hierarchy by stopping further extension.

The Builder design pattern is a creational pattern used to construct complex objects step by step. It separates the object's construction from its representation, allowing for varied configurations and ensuring immutability.

In this article, we will learn how to encapsulate data for security, leverage inheritance for code reuse, and implement polymorphism to create flexible and scalable applications.

This article guides you through starting a C# project, including setting up Visual Studio or Visual Studio Code, creating a new project, and configuring essential features like dependency injection, configuration management, and logging.

Explore Wrapper Classes and Object Composition in object-oriented programming. Learn how wrappers adapt interfaces and enhance functionality without altering code, ideal for legacy systems.

The discard variable (_), introduced in C# 7.0, allows developers to ignore values intentionally. It enhances code clarity by signaling unused data in tuples, pattern matching, out parameters, and LINQ queries, promoting cleaner, more efficient, and maintainable programming in .NET applications.

Explore the fundamentals of C# abstract classes through clear examples and detailed explanations. Learn how abstract classes facilitate code reusability and polymorphism in object-oriented programming, with practical demonstrations of their usage and implementation in C#.
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