"Generated Members Example"

void Test() {
	// Constructor
	var user = new User("Ben", 30);

	// Properties
	Console.WriteLine(user.Name); // Ben
	Console.WriteLine(user.Age); // 30

	// Equality
	var user2 = new User("Ben", 30);
	var user3 = new User("Seb", 27);
	Console.WriteLine(user == user2); // True
	Console.WriteLine(user == user3); // False

	// ToString
	Console.WriteLine(user); // User { Name = Ben, Age = 30 }
	Console.WriteLine(user3); // User { Name = Seb, Age = 27 }

	// Deconstructor
	var (userName, userAge) = user;
	Console.WriteLine(userName); // Ben
	Console.WriteLine(userAge); // 30
}


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