My Blog

Here you can find my private notes about programming that I wanted to share with you. Feel free to filter based on the topic you want or search for something specific.

    The implicit operator in C# and when it can be useful

    A cool feature of C# that I lately used is the implicit operator keywords and with them we can define the way for converting one type into another one implicitly. A good scenario when you can use that is presented in this example.

    Read the complete article

    How to transform the App Settings in different Web.config files based on the deployment environment

    Transforming a Web.config file based on the environment where an application is deployed is a common practice in .NET Framework applications to manage different settings like database connection strings, URLs, or other configuration values. In this article, we will see how to achieve this using the configuration transformation feature in Visual Studio.

    Read the complete article

    A list of my favorite C# examples using Reflection

    This article contains a list of code lines, that use reflection to access data in classes. Reflection can be combined with Generics and even though some might think it can be hacky, I find that Reflection offers a tremendous advantage when dealing with monolithic application and you want to write reusable code, and you can not use object oriented concepts such as inheritance. Let’s start without further delay.

    Read the complete article

    How to update your Azure Functions from version 2 (V2) to version 3 (V3)

    Here is a small and quick article about how to perform the update in your C# project that contains the Azure Functions of your application

    Read the complete article

    How to fix the When passing parameters by position, each parameter can only be referenced once Dapper error

    I lately had to write some queries using Dapper which use a date, defined from the user, and check this date against two other from-to dates. In other words the query tries to find if a given date is inside the range of two other dates. When I tried to use the same date-parameter to Dapper, I was getting the following exception: When passing parameters by position, each parameter can only be referenced once.

    Read the complete article