• Spotlight: AI in Enterprise
  • Videos
  • Newsletters
  • Resources

About

  • About us
  • Advertise
  • Contact Us
  • Foundry Careers
  • Newsletters
  • Reprints

Policies

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Affiliate Relationships
  • Your California Privacy Rights

Our Network

  • CIO
  • Computerworld
  • CSO
  • Network World

More

  • Blogs
  • BrandPosts
  • Events
  • Videos
  • Enterprise Buyer’s Guides
  • Analytics
  • Artificial Intelligence
  • Generative AI
  • Careers
  • Cloud Computing
  • Data Management
  • Databases
  • Emerging Technology
  • Technology Industry
  • Security
  • Software Development
  • Microsoft .NET
  • Development Tools
  • Devops
  • Open Source
  • Programming Languages
  • Java
  • JavaScript
  • Python
  • Enterprise Buyer’s Guides
Popular Topics
  • Artificial Intelligence
  • Cloud Computing
  • Data Management
  • Software Development
  • Spotlight: AI in Enterprise
  • Videos
  • Newsletters
  • Resources

Topics

  • Analytics
  • Artificial Intelligence
  • Generative AI
  • Careers
  • Cloud Computing
  • Data Management
  • Databases
  • Emerging Technology
  • Technology Industry
  • Security
  • Software Development
  • Microsoft .NET
  • Development Tools
  • Devops
  • Open Source
  • Programming Languages
  • Java
  • JavaScript
  • Python
  • Enterprise Buyer’s Guides

About

  • About us
  • Advertise
  • Contact Us
  • Foundry Careers
  • Newsletters
  • Reprints

Policies

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Affiliate Relationships
  • Your California Privacy Rights

Our Network

  • CIO
  • Computerworld
  • CSO
  • Network World

More

  • Blogs
  • BrandPosts
  • Events
  • Videos
  • Enterprise Buyer’s Guides
HomeBlogs.NET ProgrammingPage 4

.NET Programming

Filter by
Analysis
BrandPost
Feature
How-To
Interview
News
News Analysis
Opinion
Reviews
Tip
how-to

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.

By Joydip Kanjilal
Mar 23, 2021 5 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Mar 15, 2021 6 mins
Microsoft .NET C# Development Libraries and Frameworks
how-to

How to work with static anonymous functions in C# 9

Take advantage of static anonymous methods in C# 9 to improve the performance of your .NET applications.

By Joydip Kanjilal
Mar 01, 2021 6 mins
Microsoft .NET C# Software Development
how-to

How to use LazyCache in ASP.NET Core MVC 5

Take advantage of LazyCache to improve the performance and scalability of your ASP.NET 5 Core applications in heavy load scenarios.

By Joydip Kanjilal
Feb 22, 2021 6 mins
C# Microsoft .NET Web Development
how-to

How to work with record types in C# 9

Take advantage of record types in C# 9 to build immutable types and thread-safe objects.

By Joydip Kanjilal
Feb 15, 2021 8 mins
Microsoft .NET C# Software Development
how-to

How to create PDF documents in ASP.NET Core 5

Take advantage of the DinkToPdf and wkhtmltopdf libraries to generate PDF documents from HTML templates in ASP.NET Core 5.

By Joydip Kanjilal
Feb 01, 2021 6 mins
Microsoft .NET C# Software Development
how-to

How to use immutable objects in ASP.NET Core MVC 5

Take advantage of init-only setters to make configuration options immutable in ASP.NET Core MVC 5 to avoid unnecessary assignments and eliminate opportunities for errors.

By Joydip Kanjilal
Jan 25, 2021 7 mins
Microsoft .NET Software Development
how-to

Dependency injection best practices for ASP.NET Core MVC 5

Learn how to use constructor injection, property injection, method injection, and the service locator pattern in ASP.NET Core MVC 5, along with their caveats.

By Joydip Kanjilal
Jan 18, 2021 9 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Jan 04, 2021 10 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Dec 14, 2020 8 mins
C# Microsoft .NET Web Development
how-to

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.

By Joydip Kanjilal
Dec 07, 2020 7 mins
C# Microsoft .NET Web Development
how-to

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

By Joydip Kanjilal
Nov 30, 2020 7 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Nov 23, 2020 8 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Nov 16, 2020 7 mins
Microsoft .NET C# Software Development
how-to

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

By Joydip Kanjilal
Nov 09, 2020 7 mins
Microsoft .NET C# Software Development
how-to

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

By Joydip Kanjilal
Nov 02, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to use HashSet in C#

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

By Joydip Kanjilal
Oct 26, 2020 9 mins
Microsoft .NET C# Software Development
how-to

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

By Joydip Kanjilal
Oct 19, 2020 10 mins
C# Microsoft .NET Web Development
how-to

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

By Joydip Kanjilal
Oct 12, 2020 8 mins
Microsoft .NET C# Software Development
how-to

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.

By Joydip Kanjilal
Oct 05, 2020 8 mins
Microsoft .NET C# Software Development
how-to

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

By Joydip Kanjilal
Sep 28, 2020 7 mins
Microsoft .NET C# Software Development
how-to

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

By Joydip Kanjilal
Sep 21, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to benchmark C# code using BenchmarkDotNet

Take advantage of the lightweight, open source BenchmarkDotNet library to benchmark your methods and track their performance.

By Joydip Kanjilal
Sep 14, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to use fluent interfaces and method chaining in C#

Take advantage of fluent interfaces and method chaining to make your code simple, readable, and understandable

By Joydip Kanjilal
Sep 07, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to build gRPC applications in ASP.NET Core

Learn how to use gRPC, a language-agnostic, high-performance RPC framework, to build lightweight, high-performance services in ASP.NET Core 3.0

By Joydip Kanjilal
Aug 31, 2020 10 mins
Microsoft .NET C# Software Development
how-to

How to unit test static methods in C#

Learn when static methods can’t be unit tested and how to use wrapper classes and the Moq and xUnit frameworks to unit test them when they can

By Joydip Kanjilal
Aug 24, 2020 8 mins
Microsoft .NET C# Software Development
how-to

How to redirect a request in ASP.NET Core MVC

Take advantage of redirect action results in ASP.NET Core MVC to elegantly redirect a request to a specified URL

By Joydip Kanjilal
Aug 17, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to refactor God objects in C#

Follow these best practices to eliminate God objects and design classes that are loosely coupled, cohesive, and easy to maintain

By Joydip Kanjilal
Aug 10, 2020 8 mins
Microsoft .NET C# Software Development
how-to

How to use attribute routing in ASP.NET Core

Take advantage of attribute-based routing in ASP.NET Core to decouple the controller and action names from the route template and allow more flexibility in your routing.

By Joydip Kanjilal
Aug 03, 2020 10 mins
Microsoft .NET C# Development Libraries and Frameworks
how-to

How to pass parameters to action methods in ASP.NET Core MVC

Explore the various ways in which you can pass parameters to action methods in ASP.NET Core MVC

By Joydip Kanjilal
Jul 27, 2020 8 mins
Microsoft .NET C# Software Development
how-to

How to use API Analyzers in ASP.NET Core

Take advantage of API Analyzers and Swagger to improve the documentation of your ASP.NET Core APIs

By Joydip Kanjilal
Jul 20, 2020 9 mins
Microsoft .NET C# APIs
how-to

How to use route data tokens in ASP.NET Core

Take advantage of data tokens in ASP.NET Core to attach additional information to a route and retrieve it programmatically when needed

By Joydip Kanjilal
Jul 13, 2020 7 mins
Microsoft .NET Software Development
how-to

How to use ValueTask in C#

Take advantage of ValueTask in C# to avoid allocation when returning task objects from an asynchronous method

By Joydip Kanjilal
Jul 06, 2020 8 mins
Microsoft .NET C# Software Development
how-to

How to use immutability in C#

Learn the importance of immutability and how to take advantage of it in your C# applications

By Joydip Kanjilal
Jun 29, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to use API versioning in ASP.NET Core

Take advantage of API versioning in ASP.NET Core to manage the impact of changes to your APIs on your clients

By Joydip Kanjilal
Jun 22, 2020 10 mins
Microsoft .NET C# Software Development
how-to

How to use Data Transfer Objects in ASP.NET Core 3.1

Learn the benefits of Data Transfer Objects, why they should be immutable, and how to take advantage of them in your ASP.NET Core applications

By Joydip Kanjilal
Jun 15, 2020 9 mins
Microsoft .NET C# Software Development
how-to

How to use const, readonly, and static in C#

Understand the similarities and differences between the const, readonly, and static keywords in C#

By Joydip Kanjilal
Jun 08, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to handle 404 errors in ASP.NET Core MVC

Take advantage of ASP.NET Core middleware to handle 404 errors more gracefully in ASP.NET Core MVC

By Joydip Kanjilal
Jun 01, 2020 7 mins
Microsoft .NET C# Software Development
how-to

How to use dependency injection in action filters in ASP.NET Core 3.1

Take advantage of dependency injection to make your action methods in ASP.NET Core lean, clean, and maintainable

By Joydip Kanjilal
May 25, 2020 9 mins
Microsoft .NET C# Software Development
how-to

How to use data annotations in C#

Take advantage of data annotations to decorate your models using attribute tags so that your application’s data definition can be managed in a single place.

By Joydip Kanjilal
May 18, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to use the options pattern in ASP.NET Core

Take advantage of the options pattern to load configuration data directly into your classes at runtime for simple and flexible configuration data management

By Joydip Kanjilal
May 11, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to use endpoint routing in ASP.NET Core 3.0 MVC

Learn how to implement endpoint routing in ASP.NET Core 3.0 MVC to bring more flexibility and functionality to your applications

By Joydip Kanjilal
May 04, 2020 8 mins
Web Development Microsoft .NET Software Development
how-to

How to work with GUIDs in C# 8

Take advantage of GUIDs to create universally unique identifiers and avoid data collisions in your applications

By Joydip Kanjilal
Apr 27, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to export data to Excel in ASP.NET Core 3.0

Learn how to use the ClosedXML NuGet package to export data as a CSV or XLSX file for Excel from an ASP.NET Core application.

By Joydip Kanjilal
Apr 20, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to use anonymous types in C#

Take advantage of anonymous types in C# to create and instantiate types that have read-only properties without having to declare the type beforehand

By Joydip Kanjilal
Apr 13, 2020 6 mins
Microsoft .NET C# Software Development
how-to

How to use LoggerMessage in ASP.NET Core 3.0

Take advantage of high-performance logging by using LoggerMessage instead of Logger extension methods in ASP.NET Core

By Joydip Kanjilal
Apr 06, 2020 5 mins
Microsoft .NET C# Software Development
how-to

How to send emails in ASP.NET Core

Take advantage of the open source MailKit library to send emails in ASP.NET Core easily.

By Joydip Kanjilal
Mar 30, 2020 5 mins
Microsoft .NET C# Software Development
how-to

How to use indices and ranges in C# 8.0

Take advantage of indices and ranges in C# 8.0 to access elements or slices of a collection with simplicity and ease

By Joydip Kanjilal
Mar 23, 2020 5 mins
Microsoft .NET C# Software Development
how-to

How to log data to SQL Server in ASP.NET Core

Take advantage of the open source library Serilog to log your ASP.NET Core application’s data to SQL Server or another database target.

By Joydip Kanjilal
Mar 16, 2020 5 mins
Microsoft .NET C# Software Development
how-to

How to use asynchronous streams in C# 8.0

Take advantage of the ability to create and consume data streams asynchronously in C# 8.0 to improve the performance of your applications.

By Joydip Kanjilal
Mar 09, 2020 6 mins
Microsoft .NET C# Software Development
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

Show me more

opinion

The dirty little secret of open source contributions

By Matt Asay
Nov 18, 20244 mins
Technology IndustryOpen Source
Image
feature

14 great preprocessors for developers who love to code

By Peter Wayner
Nov 18, 202410 mins
Development ToolsSoftware Development
Image
feature

Designing the APIs that accidentally power businesses

By Jean Yang
Nov 18, 20246 mins
APIsSoftware Development
Image
video

Building Python wheels to distribute your programs

Nov 15, 20246 mins
PythonSoftware Development
Image
video

Creating a pip install-able Python package

Nov 14, 20243 mins
PythonSoftware Development
Image
video

How to get better web requests in Python with httpx

Oct 07, 20244 mins
Python
Image
About
  • About us
  • Advertise
  • Contact Us
  • Foundry Careers
  • Reprints
  • Newsletters
  • BrandPosts
Policies
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Affiliate Relationships
  • Your California Privacy Rights
  • Privacy Settings
Our Network
  • CIO
  • Computerworld
  • CSO
  • Network World
  • LinkedIn
  • X
  • Facebook
Copyright © 2024 IDG Communications, Inc.