C#

C# | News, how-tos, features, reviews, and videos

shutterstock 111592973 runners passing baton relay race
code abstract matrix

shutterstock 1850095465 internet API application programming interface

How to use OpenAPI in ASP.NET Core

Take advantage of the built-in support for OpenAPI in ASP.NET Core to automatically document your HTTP endpoints. Minimal APIs are supported too.

question marks

How to use the null object pattern in .NET

Take advantage of the null object pattern in .NET to eliminate the need for null checks and avoid runtime errors in your applications.

system lock console background

How to use symmetric and asymmetric encryption in C#

Learn how to protect the information handled by your .NET applications by encrypting and decrypting the data using either a single key or a public/private key pair.

shortcut through a maze

Introducing Cadl: Microsoft’s concise API design language

With Cadl, you can write a 500-line OpenAPI definition in 50 lines of code. It’s a logical way for architects and developers to construct and constrain APIs.

DevOps DevSecOps Security Pipeline

How to work with endpoint filters in ASP.NET Core 7

Take advantage of endpoint filters in ASP.NET Core 7 to modify request and response objects, short-circuit the request processing pipeline, or handle cross-cutting concerns for every request.

streams of light on the highway 1200

How to use BufferedStream and MemoryStream in C#

Take advantage of the stream classes in .NET 7 for faster reads and writes of the data in your .NET applications.

question marks pavement

How to use EF Core query types in ASP.NET Core 7

Take advantage of query types in EF Core to query types that don’t have keys and to map to tables and views that lack an identity column.

hands hold a string of lightbulbs hands at sunset / ideas / brainstorming / invention / innovation

6 state management techniques for ASP.NET Core MVC

You have a number of different ways to store and retrieve data between requests in ASP.NET Core MVC applications. Here’s how to take advantage of them.

logs

How to work with logging in EF Core 7

Learn how you can use Entity Framework Core to log data to the console, SQL Server, and other log targets when working with ASP.NET Core 7 applications.

twins mirror reflection duplicate simulate man holding mirrors reproduce dock beach ocean

How to use the in, out, and ref keywords in .NET Core

Take advantage of the in, out, and ref keywords to pass parameters to your C# methods in .NET and make your code more readable and maintainable.

binary code matrix

How to use BitArray in .NET 7

Take advantage of the BitArray class in .NET 7 to perform bitwise operations on your data for improved performance.

network speed

How to improve EF Core 7 performance

Take advantage of these five best practices to improve data access performance when working with Entity Framework Core in ASP.NET Core 7 applications.

An exclamation-mark alert in a field of abstract technology.

Use model validation in minimal APIs in ASP.NET Core 6

Take advantage of FluentValidation to validate your model classes when working with minimal APIs in ASP.NET Core 6.

yes no neon sign cancel buzzwords just say no red neon by sarawuth702 getty

How to use cancellation tokens in ASP.NET Core 7

Take advantage of cancellation tokens in ASP.NET Core to allow long running operations to be cancelled gracefully and keep applications responsive.

02 crown king queen royalty

Why the C programming language still rules

The C language has been a programming staple for decades. Here’s how it stacks up against C++, Java, C#, Go, Rust, Python, and the newest kid on the block—Carbon.

futuristic digital tunnel

How to use route handler filters in minimal APIs in ASP.NET Core 7

Take advantage of minimal API filters in ASP.NET Core 7 to modify request and response objects or short-circuit the request processing pipeline.

gears iot

How to create a custom configuration provider in ASP.NET Core 6

ASP.NET Core configuration providers read configuration data from common sources such as JSON files and databases. But you can use other sources by creating custom configuration providers.

A leaping dog catches a flying disc, midair.

How to use EF Core as an in-memory database in ASP.NET Core 6

Entity Framework Core allows you to store and retrieve data to and from an in-memory database. It’s a quick and easy way to test your ASP.NET Core 6 web applications.

Load More