C#

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

Tech Spotlight   >   IT Leadership [Network World]   >   IT leader considers an abstract IoT network
abstract networks and connections

cyber security shield lock protect

How to use security headers in ASP.NET Core MVC 5

Take advantage of security headers in ASP.NET Core MVC 5 to protect your website against cross-site scripting, code injection, clickjacking, and other attacks.

hyper convergence speed burning rubber tire binary fast by tao55 getty images

Microsoft .NET JSON serializer could get faster startup

Improved throughput and reduced application size are also on the drawing board for the System.Text.Json serializer.

question mark concept decision background

Singleton vs. static classes in C#

Understand the differences between a singleton class and a static class and when to use which in your applications.

One large glowing question mark surrounded by many small question marks.

How to handle unknown actions in ASP.NET Core MVC 5

Handle unknown actions elegantly in ASP.NET 5 by creating routes that dynamically map to the views in your application.

icons working out weight lifting

How to overload action methods in ASP.NET Core MVC 5

Overloading action methods that use identical HTTP verbs is tricky in ASP.NET Core 5, but there are a number of ways to do it. Let’s explore them.

skyscraper windows2

How to log data to the Windows Event Log in C#

Take advantage of the Windows Event Log to store the log data of your .NET Core applications running on Windows

anonymous masks

Use multiple implementations of an interface in ASP.NET Core

How to register multiple implementations of an interface with the IoC container in ASP.NET Core and retrieve a specific service at runtime

Abstract network of digital streams.

How to use RecyclableMemoryStream in .NET Core

Take advantage of Microsoft.IO.RecyclableMemoryStream to eliminate LOH allocations and avoid memory fragmentation and memory leaks in your .NET Core applications.

swimming pool 168812304

How to use ArrayPool and MemoryPool in C#

Take advantage of array pooling and memory pooling in C# to reduce allocations and improve the performance of your applications

speed_digital_car_lights_vehicle_fabio ballasina unsplash

How to use the Buffer class in C#

Take advantage of the Buffer class in .NET to improve application performance through faster access to data in memory

big collection of snowflakes. 95474787

How to use HashSet in C#

Take advantage of high-performance HashSet collections for storing unique elements to speed up searches in your applications.

Fire 89709166

Microsoft Blazor gains Infragistics UI toolkit support

Ignite UI for Blazor combines a data grid with interactive charts, graphs, maps, and other web UI components

internet web browser

How to use IHttpClientFactory in ASP.NET Core

Take advantage of IHttpClientFactory to create HttpClient instances seamlessly and avoid having to manage their lifetimes manually

Spotlights on stage

What’s new in Microsoft .NET 5

Aimed at unifying the .NET platform, .NET 5 brings improvements to RyuJIT code quality, garbage collection, and JSON serialization, for starters

error neon mistake

How to use the ProblemDetails middleware in ASP.NET Core

Take advantage of the open source ProblemDetails middleware in ASP.NET Core to send clients standardized, machine-readable error messages when exceptions occur

detour sign

How to create route constraints in ASP.NET Core

You can take advantage of custom route constraints in ASP.NET Core to validate route values and avoid passing unwanted or unnecessary requests to action methods.

Hacker in hoodie holding up finger to be quiet secret

How to manage user secrets in ASP.NET Core

Take advantage of user secrets management in ASP.NET Core to prevent the sharing of sensitive application data in your projects

name badges hello

How to use named and optional parameters in C#

Take advantage of named and optional parameters in C# for improved readability, flexibility, and COM interoperability

Load More