C# 14 · Basics

Return several values

Tuples group values without defining a type, and can be deconstructed.

(int Min, int Max) Range(int[] values) => (values.Min(), values.Max());

var (min, max) = Range([3, 9, 1]);

Official C# 14 documentation

More basics commands

All basics commands · C# 14 cheatsheet

Was this page helpful?