All posts with Tag struct

Preview image blogpost

default(MyStruct) vs new MyStruct() - what is the difference?

There are multiple ways to create a new struct, either via var myStruct = default(MyStruct) or via var myStruct = new MyStruct(); . Are there any differences?

Read the whole article

struct vs readonly struct vs ref struct vs record struct

C# knows struct since its down of time. But there are also recent additions like readonly struct, record struct and ref struct.

This article will show what are the differences between those 4.

Read the whole article

struct Performance

Let's have a small look into structs and how they work when using Equals and GetHashCode. Plus have a brief look into a new C# 10 feature: readonly record struct.

Read the whole article

An error has occurred. This application may no longer respond until reloaded. Reload x