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

C# HttpClient - How to set the Content-Type header for a request

This post describes how to make a HTTP request with a specific content-type using the HttpClient in C#. Using the HttpClient you can POST JSON or »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient 26 June 2022

C# Dapper - How to execute a select statement using a list of Ids with an IN clause in MSSQL

Using Dapper you can easily map results of a query to an object or a list of objects. Sometimes you want to select a list of »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Dapper, MSSQL 17 June 2022

C# Dapper - How to make select, insert, update and delete statements

Dapper makes it easy to "Execute a query and map the results - if any - to a strongly typed List". This post demonstrates »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, MSSQL, Dapper 13 June 2022

C# Dapper - Return inserted identity

This post describes two ways to get the generated identity of a newly inserted row. We will use the following table simple table with an Id »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, MSSQL, Dapper 12 June 2022

C# - How to send an object as JSON using the HttpClient

In C# You can easily send an object as JSON with a couple of lines of code. In the below we have an object with a »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen 10 June 2022

C# - How to use the DataContractSerializer to serialize or deserialize XML

One way to deserialize XML is using the DataContractSerializer. You can read XML and deserialize it into an object or serialize an object into XML. If »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 10 June 2022

C# - program does not contain a static 'main' method suitable for an entry point

A common reason for this error is that you using the wrong type of project output. In Visual Studio try the following and rebuild: * Right click »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 10 June 2022

C# - How to deserialize a list of strings using the DataContractSerializer with ReadObject

I found many examples on how to do this around the internet: * DataContractSerializer Deserialize list not working * How to Deserialize XML using DataContractSerializer * DataContractSerializer Class But »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C# 08 June 2022

Python - '' vs "", single quotes vs double quotes

In Python you can write strings with both single and double quotes. In short you can pick and choose when to use one over the other, »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Python 07 June 2022

C# - Should you reuse your HTTPClient? or dispose it after every request?

I have always been told to reuse the HttpClient throughout the application lifetime for better performance and stability. If you search for why, there are quite »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient 06 June 2022
← Newer Posts Page 10 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