C#

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

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.

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.

network endpoint connections / synapses

How to version minimal APIs in ASP.NET Core 6

Follow these steps to implement API versioning in minimal Web API endpoints using ASP.NET Core 6.

man running across finish line

Microsoft's C# 11 language upgrade nears the finish line

Object initialization and generic math get attention in the latest improvements to the well-known programming language.

Conceptual cybersecurity system locks down a network of interconnected elements.

How to implement JWT authentication in ASP.NET Core 6

It’s easy to secure minimal API endpoints in ASP.NET Core 6 using JSON Web Tokens for authentication and authorization. Just follow these steps.

tools / toolkit

Microsoft launches .NET Community Toolkit

Collection of .NET libraries originally developed for the Windows Community Toolkit can now be used regardless of UI framework.

emerging technology - virtual reality [VR] / augmented reality [AR] headsets in use at a meeting

Build .NET apps for the metaverse with StereoKit

Microsoft’s open source mixed-reality tools make it easy to build OpenXR apps in .NET.

Load More