C# - How to check if a character is in a string?
In C# you can easily check if a string contains one character or a series of characters using the .Contains() method on the String object. Below »
In C# you can easily check if a string contains one character or a series of characters using the .Contains() method on the String object. Below »
This post describes how to create a simple Console application and run it on Linux, for this we will be using WSL (Windows Subsystem for Linux) »
In C# you have several ways to interact with files and folders, the most common are the File, Directory and FileInfo classes. Using these classes you »
You can add a JWT bearer token to a request by adding it to the Authorization header with a bearer scheme in front of the token »
In C# you can use the Random class to get random numbers: Random random = new Random(); var diceRoll = random.Next(1,7); In the above we »
In C# you can easily convert a DateTimeOffset to Unix time in seconds or miliseconds using the built-in methods ToUnixTimeSeconds or ToUnixTimeMilliseconds: var dateTimeOffset = DateTimeOffset.Now; »
Some code bases use the .Migrate() or .MigrateAsync() to upgrade their databases to the newest version. Using .Migrate() with no additional parameters upgrades the database to »
I have made a quite a few posts about SelectToken and SelectTokens by now. This post describes how to get two or more properties from a »
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 »
You can check if two lists have the same content and in the same sequence using SequenceEqual:
var list1 = new List