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.
IQueryable vs IEnumerable" explores the differences between these two interfaces in C#. IQueryable is suitable for building dynamic queries against a database, allowing deferred execution and optimized query translation.

Learn core C# programming concepts including variables, control flow, methods, object-oriented programming, generics, LINQ, and async/await with practical examples.

The Thread Pool in C# simplifies concurrency by managing threads for you. Unlike creating and managing threads yourself, the Thread Pool offers a pool of reusable threads, improving performance and reducing complexity. It's ideal for short-lived tasks like calculations or processing data.

BLOBs (Binary Large Objects) efficiently store large files (images, videos) in databases. Saving/retrieving them involves managing memory usage for optimal performance. This article explores C# techniques using FileStream and BinaryReader to break BLOBs into manageable chunks, ensuring smooth database interaction.

Learn C# memory optimization techniques including garbage collection tuning, Span and Memory, unsafe pointers, stack allocation, finalizers, and object pooling.

This guide explores implementing CRUD operations in a C# Windows Forms application using stored procedures. Learn to connect to SQL Server, execute stored procedures, and handle data efficiently.

Use a native VC++ DLL with inline assembly to call math and CPU-information routines from C#. Learn the managed-to-unmanaged interop steps and DLL configuration involved.

A public constructor that accepts initialization data is required so that the client can pass-in minimum state for the type to be valid. Private constructor, on the other hand, is used by methods to construct a new object and set its entire state.

Explore the elegance of the latest terse syntax for collection expressions, offering unparalleled simplicity in programming. Dive into efficient coding techniques, optimized syntax, and enhanced readability, revolutionizing how you interact with collections in programming languages.

Learn how to create a custom collection class in C#, utilizing the Customer class with attributes. Implement and manage customer data with CollectionBase, including methods for adding, removing, and accessing customer instances. Explore auto-defined properties and List collections in C#.

Learn how to efficiently create and retrieve records from an MS Access 2003 database using OLEDB in C#. This guide covers setting up the OLEDB connection, executing SQL commands, and handling data operations seamlessly.

This C# code defines a simple text editor application in Windows Forms. It includes functionalities to open, save, clear text, and exit. File handling operations are performed using StreamReader and StreamWriter.

In C#, the "is" operator checks if an object is of a specified type, returning a boolean. The "as" operator attempts to cast an object to a specified type, returning null if the cast fails. Both operators facilitate safe type conversions and runtime type checking, enhancing type safety and reducing exceptions in object-oriented programming.

Develop a Windows app in C# .Net using the Microsoft Speech Object Library to deliver New Year wishes. Steps include adding the Speech Object Library reference, designing the UI with a Label, TextBox, and Buttons, and implementing code to speak the wishes using the SpVoice object.

This guide covers how to insert and retrieve records from Microsoft Excel 2007 using OLEDB in C#.NET. It explains setting up OLEDB connections, executing SQL commands for data manipulation, and handling Excel data within C# applications.

Do-while loop in C# guarantees execution of code block at least once. Syntax: do { /* Code */ } while (condition);. Steps involve code execution, condition evaluation, loop continuation, and termination. Example demonstrates printing numbers from zero to five.

Exception filtering, a notable addition in C# 6.0, enhances error handling by allowing catch blocks to specify conditions for exception handling. This feature, employing the 'when' keyword, enables developers to filter exceptions based on specific criteria, promoting clearer and more concise error management in code.

The provided C# 6.0 code demonstrates the use of string interpolation, auto-implemented properties, and object initialization syntax. It showcases the nameof operator to retrieve variable names statically.

Auto Property Initializer, a feature in C# 6.0, simplifies property initialization by allowing default values to be assigned directly within property declarations. This enhances code readability and reduces verbosity, improving software development efficiency.

Dictionary Initializers, a new feature in C# 6.0, streamline code by enabling concise initialization of dictionaries with key-value pairs. This enhances code readability and reduces verbosity in .NET programming, promoting efficient software development.

Mastering SOLID principles in C# enhances software design by promoting maintainability, scalability, and robustness. These principles include Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.

C# 6.0 introduces Static Class Statements, simplifying code organization and enhancing readability by allowing static members to be imported directly, improving code maintenance and reducing verbosity in .NET programming.

Learn how C# 6.0 allows await expressions in catch and finally blocks, enabling asynchronous exception handling and cleanup operations.

C# 6.0 introduced Expression Bodied Members, leveraging Lambda expressions to simplify syntax, reduce code, and enhance readability. These members streamline method and property definitions, offering a concise alternative to traditional syntax, resulting in cleaner and more maintainable code.

On November 12, 2014, Microsoft announced Visual Studio 2015 Preview and C# 6.0, featuring the Null Propagation Operator. This operator simplifies null checks, reducing code complexity and bugs. It allows checking for null values in object reference chains using the ?. operator, streamlining error handling and improving code readability.

C# nameof operator returns the unqualified string name of a variable, type, or member. In this article, we will learn how to use the nameof operator in C# code example.

Learn how the C# nameof operator replaces hard-coded strings for argument validation, property-change notifications, and safer refactoring.

Reflection in C# allows runtime inspection and interaction with object types and members, enabling dynamic invocation, type inspection, and metadata access. It's powerful for development tools and debugging utilities.

C# HashSet, introduced in .NET 3.5 within System.Collections.Generic, is an unordered collection of unique elements. It efficiently prevents duplicate entries, outperforming lists. This article covers basic HashSet operations, handling custom types, and ensuring uniqueness using IEquatable, Equals, and GetHashCode methods.

Learn how to work with stacks in C#. The Stack class in C# provides a collection of objects that follows the Last-In-First-Out (LIFO) principle. Key operations include Push, Pop, and Peek. Understanding stacks is essential for tasks requiring reverse-order processing and can enhance your programming skills 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