Home Tags Privacy About
Peter Daugaard Rasmussen's Picture

Peter Daugaard Rasmussen

Programmer, Developer, Consultant.

Randers - Denmark https://peterdaugaardrasmussen.com 403 posts
← Newer Posts Page 7 of 41 Older Posts →

C# - NSubstitute, how to mock and match a call that takes a list of items as a parameter

NSubstitute is a great framework for mocking objects for tests. I recently had an unexpected behaviour when stubbing a method call. For this simple example we »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Testing 21 October 2022

C# - How to compare a list of strings, ints or longs with another list

You can check if two lists have the same content and in the same sequence using SequenceEqual: var list1 = new List<int> { 1, 2, »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 19 October 2022

Ezoic - Drop in traffic from Bing a month after joining

1st January 2023 Something is happening! I have made an update down below! Let me be absolutely clear, this could be entirely a Bing issue and »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Blogging 17 October 2022

C# - How to start a task without waiting for it to finish

This post demonstrates how to run a piece of code asynchronously in C#. This is easily achieved with the Task library. You can start a new »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 12 October 2022

Ezoic - Eligible for next level from Access now but not granted

I recently hit the mark for getting access to level 1 of Ezoic (10.000 visits and 50$ made in a month). I started out in »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Blogging 10 October 2022

C# - List VS Array, differences and when to use what

Both Lists and Arrays in C# are collections* that can hold simple types, objects and structs. We will start by going through the basics of arrays »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 09 October 2022

An ezoic experiment (a switch from adsense)

For the last couple of years I have had sidebars on my blog with adsense ads. It has mainly been an experiment as I had never »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Blogging 08 October 2022

C# - How to get started with WireMock and stub a simple request

You may have been using other frameworks for mocking and stubbing your HTTP requests - also known as using an "Imposter". This post demonstrates »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Wiremock 22 September 2022

ASP.NET - What is the difference between ConfigureServices and Configure?

In previous versions of .Net the standard was to have a startup.cs file which implemented two methods: * ConfigureServices: Which is responsible for configuring dependency injection. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, ASP.NET 17 September 2022

C# - How to subtract time from a DateTime or DateTimeOffset

You are likely looking for one of these two examples (using hours): var dateTimeMinusOneHour = DateTime.Now.Subtract(TimeSpan.FromHours(1)); var dateTimeMinusOneHour = DateTime.Now.AddHours(-1) »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 06 September 2022
← Newer Posts Page 7 of 41 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 © 2025 Privacy policy