Home Tags Privacy About

All posts tagged with "C#"

C# (C-sharp) is a general-purpose programming language using strong typing, It was developed around 2000 by Microsoft and used on the .Net platform.

← Newer Posts Page 9 of 13 Older Posts →

C# - What is the "??=" null-coalescing assignment operator?

Almost 5 years ago I made a post on the null conditional operator [https://peterdaugaardrasmussen.com/2016/05/28/c-the-null-conditional-operator-and-the- »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 04 March 2021

C# - What is the "??" null-coalescing operator?

Almost 5 years ago I made a post on the null-conditional operator [https://peterdaugaardrasmussen.com/2016/05/28/c-the-null-conditional-operator-and-the- »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 02 March 2021

Asp.net core - How to inject a dependency into a controller using standard dependency injection

Asp.net core has built in dependency injection. If you have a standard Asp.net core project you will find the method ConfigureServices in your startup. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 20 January 2021

Asp.net core - What is the difference between AddTransient, AddSingleton and AddScoped?

When you wish to use dependency injection in Asp.net core you have three choices for the lifetime scope of your dependency. The three choices are »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on ASP.NET, C# 18 January 2021

C# - When to use threads instead of tasks

I have not yet found a situation where I needed a thread instead of a Task. Threads are a lower level concept when compared to tasks. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Tasks and threads 31 October 2020

C# - How to PUT or POST JSON using the HttpClient in .Net

In this post I demonstrate how you can PUT or POST JSON using the HTTPClient in C#. The simplest way to do this is using the »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on HttpClient, C#, Web and HTTP 24 October 2020

C# - How to put or post XML using the HttpClient - updated for 2023

It is quite easy to send XML using the HttpClient. In order to do this you need to use the StringContent object, provide it with an »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 23 September 2020

C# - When to use value tuples and when to use classes - updated 2022

Value tuples were introduced with C# 7. The original tuples have been around since 2010 when they were released with .Net Framework 4.0. Even though »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 16 September 2020

xUnit - How to assert that a method throws an exception - 2022

A year ago I made a post on the absence of the DoesNotThrow assertion in xUnit. In this post I show how you can assert if »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 09 September 2020

C# - How to avoid having Tuple members named item1, item2 itemX etc. in methods, lists and variables

Earlier this year I made a post on how to make a list of named value tuples. I decided to make a new post with some »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 08 September 2020
← Newer Posts Page 9 of 13 Older Posts →
  • Rss
  • Twitter
  • LinkedIn
  • profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2026 Privacy policy