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 7 of 13 Older Posts →

C# - How to setup WebApplicationFactory in .Net 6 without a startup.cs file

Prior to .Net 6 you would have a startup.cs class to set up your asp.net application. In .Net 6 the standard is now to »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Testing, C# 05 February 2022

C# - Get a DateTime or DateTimeOffset in UTC format or a time zone format

Most APIs you come across use a standard for the format of dates and time, often it will be the ISO 8601 format, known as round-trip »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 22 January 2022

C# - How to get a property from a JSON string without parsing it to a class using SelectToken and JObject

Often you would use a class to represent the JSON object you want to Deserialize, however for whatever reason you might want to skip the class »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 18 January 2022

C# - How to parse JSON using DeserializeObject from JSON.net

I recently extended a post on how to call the yahoo finance API [https://peterdaugaardrasmussen.com/2021/11/14/csharp-how-to-call-the-yahoo-finance-api/] with details on how to serialize »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 17 January 2022

C# HttpClient - How to use basic authentication and set the HTTP authorization header

Basic authentication is becoming a rare sight, however it is still quite widely used due to its simplicity. In C#, using the HttpClient and HttpRequestMessage you »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient, Web and HTTP 08 January 2022

C# - Error: "Program does not contain a static 'main' method suitable for an entry point" when building solution

You are likely here because you are trying to make your main method use the async keyword. The gotcha I ran into - which is quite »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Tasks and threads 05 January 2022

C# - How to start multiple tasks and wait for them all to finish

What you are likely looking for is the method Task.WaitAll(task1, task2, task3..);. The method allows you to wait for several tasks to finish, even »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Tasks and threads 20 December 2021

C# - How to call the Yahoo Finance API in .Net

Yahoo has one of the best free financial APIs [https://www.yahoofinanceapi.com/] out there and in this post you will see an example of how »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 14 November 2021

C# - How to make Newtonsoft serialize enums as strings instead of integers

Using Newtonsoft.Json you might be annoyed that the default way to serialize enums [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum] is serializing »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 13 November 2021

C# - How to use ForEachAsync()

With .Net 6 we got the new Parallel.ForEachAsync method from the parallel library. Previously we had to make do with Parallel.ForEach method which had »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Tasks and threads, C# 13 November 2021
← Newer Posts Page 7 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 © 2025 Privacy policy