"'With' Expression on Struct"

public struct User {
	public string Name;
	public int Age;

	public User(string name, int age) {
		Name = name;
		Age = age;
	}
}

// ...

var user = new User("Ben", 31);
var birthdayBoy = user with { Age = user.Age + 1 };
Console.WriteLine(birthdayBoy.Name + " is now " + birthdayBoy.Age); // Prints "Ben is now 32"


Code snippet taken from "Two Decades of C#: A Reference - C# 10".