Posts tagged as "csharp"

Transitioning from C# LINQ to Java Streams
12 min

Transitioning from C# to Java? Mapping C# LINQ functions to Java Streams may seem challenging, but we'll explore their equivalents in this blog post.

Read post ›
Product Review: NDepend
5 min

NDepend is a static code analyser for .Net developers. Let's find out if it's worth adding to your toolbelt.

Read post ›
How to load test data from a JSON file for xUnit tests
3 min

In this post, we add a custom attribute in xUnit to load test data from a JSON file.

Read post ›
How to Serialize enums as strings in .Net Core
1 min

If you try to serialize an enum to Json using System.Text.Json in .Net Core, it converts it into an integer by default. This is not very readable. How can we have a more readable enum value in the JSON output?

Read post ›
How to set all bits of an enum flag in C#
1 min

Sometimes, we want to set all the bits on a flag. The easiest way to do this is by adding another value to the enum. But there is a more elegant way using LinQ which does not require updating the flag.

Read post ›
How to set up the project properties for Source Generators
2 min

A guide to setting up the project properties that we need to create and use source generators

Read post ›
How to get TimeZoneInfo on Windows and Linux
1 min

Lets see how we can get the TimeZoneInfo regardless of whether the code is running on Windows or Linux

Read post ›
How to use ApprovalTests with xUnit's Theory attribute
1 min

The approval test filename for Theory-based tests is not unique by default. How can we get generate unique filenames for theory-based approval tests.

Read post ›
Dapper and NPGSql : Write a query with the IN operator
1 min

In this post, I look at what changes need to be made to write a query with the IN operator in a WHERE clause using Dapper and NPGSql

Read post ›