skip to content
Relatively General .NET

Announcing F# 8

by RNDr. Tomáš Grošup, Ph.D.

posted on: November 14, 2023

Read what is new in F# 8 - the language, compiler tooling and FSharp.Core standard library

Announcing C# 12

by Kathleen Dollard

posted on: November 14, 2023

Announcing the official release of C# 12, including collection expressions, primary constructors, and more!

Removing allocations by reducing closure scopes using local variables

by Gérald Barré

posted on: November 13, 2023

Lambdas can use variables from the enclosing methods (documentation), unless the lambda is static. When a variable is captured, the compiler generates code to create the bridge between the enclosing method and the lambda. Let's consider this simple example:C#copypublic void M() { var a = 0;

Automating Memory Profiling with the JetBrains dotMemory Profiler API

by Steve Gordon

posted on: November 10, 2023

Those who have read some of my previous performance-focused blog posts will know that I use the dotMemory product from JetBrains when working on code optimisations. In this post, I want to demonstrate a really handy, but somewhat underutilised feature, to automate the collection of snapshots in a repeatable way. I use these steps quite […]

Reading a stream of JsonDocuments separated by new lines (ndjson)

by Gérald Barré

posted on: November 06, 2023

There are formats where you need to read a stream of JsonDocuments separated by a character such as a new line. For instance, you can try to read data from a ndjson response. In this post, I'll show you how to read such a stream.A basic solution would be to split the stream by the separator and the

File paths in a Roslyn analyzer or source generator

by Gérald Barré

posted on: October 30, 2023

In Roslyn, a SyntaxTree represents the content of a source file. If you need to know the source file that created this SyntaxTree, you can use the FilePath property. This property represents the file path on the disk. But, the file path on the disk may not be what you want.On CI, you should use rep