C#

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

flight data recorder
blog 6 image

2 filtering

How to use filters in ASP.NET Core MVC

Take advantage of filters to execute custom code at specific points in the request processing pipeline and avoid code duplication across actions.

executive pushing boulder uphill deadline stress struggle

How to avoid redundant DI code in ASP.NET Core

Take advantage of base controllers to avoid dependency injection code duplication and enforce the DRY principle in ASP.NET Core MVC.

integrated digital tools / interoperable tools

Microsoft previews 64-bit Visual Studio 2022 IDE

Company seeks feedback on the planned next version of its flagship integrated software development environment.

whats next for windows

How to use Razor View Engine in ASP.NET Core MVC

Take advantage of the friendly syntax of Razor View Engine to more easily create views from templates in ASP.NET Core MVC.

A virtual checkmark in digital system / standards / quality control / certification / certificates

How to validate method parameters using PostSharp in C#

Take advantage of aspect-oriented programming using PostSharp to validate method parameters in C#.

3D tin can phones, by Chris Potter / CC BY 2.0

How to use closures in C#

Take advantage of closures in C# — including anonymous methods, delegates, and lambda expressions — to make your code robust, efficient, readable, and easier to maintain.

Java  >  Lambda expressions  >  Lambda symbol / abstract formulas / binary code

How to build AWS Lambda functions in .NET Core

Learn how to use .NET Core and the AWS Toolkit for Visual Studio to build serverless functions and deploy them to AWS Lambda in the Amazon cloud.

A magnifying lens sits on a paper web browser window. [internet / online / search]

How to read request headers in ASP.NET Core 5 MVC

Learn how to read request headers and work with optional data that is passed between the server and client in ASP.NET Core 5 applications.

flames

Get started with Blazor in .NET 5

Take advantage of Blazor, Microsoft’s answer to full-stack development, to build rich web apps with C# and .NET Core.

Plastic, magnetic letters in compartmented boxes.

When to use String vs. StringBuilder in .NET Core

Take advantage of these best practices when working with strings in .NET Core for the optimal performance of your applications.

sort filter seprate strawberries in boxes

How to use SortedDictionary, SortedList, and SortedSet in C#

Take advantage of the SortedDictionary, SortedList, and SortedSet classes in C# to store key-value pairs and sort them based on keys.

parallel architecture

How to use Parallel.For and Parallel.ForEach in C#

Take advantage of lock-free, thread-safe implementations in C# to maximize the throughput of your .NET or .NET Core applications.

open door with sunlight shining through

Microsoft open sources C# standards work

Work on the ECMA standard for C# 6 and later versions will take place in a public working space on GitHub.

Garbage can paper trash

How to avoid GC pressure in C# and .NET

Take advantage of these best practices to avoid memory pressure and improve performance when working in .NET or .NET Core applications.

Microsoft Windows 10X [logo]

Microsoft inches closer to unified Windows SDK

The latest preview bits of Microsoft’s Project Reunion for building Windows 10 desktop applications are ready for testing and even for production.

target bullseyes

How to use target typing and covariant returns in C# 9

Learn two of the most important features in C# 9.0 to make your code more concise, readable, flexible, and efficient.

rock stacking

How to use top-level programs in C# 9

Take advantage of the new top-level statements in C# 9.0 to eliminate boilerplate code and make your programs more readable, maintainable, and efficient.

mismatched shoes

How to use pattern matching in C#

Take advantage of the new relational and logical patterns in C# 9.0 to make your code more readable, maintainable, and efficient.

Load More