"Range Creation Examples"

var characterArray = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G' };

var rangeA = 0..3; // characterArray[rangeA] is ['A', 'B', 'C']
var rangeB = 3..^0; // characterArray[rangeB] is ['D', 'E', 'F']
var rangeC = 0..^0; // characterArray[rangeC] is ['A', 'B', 'C', 'D', 'E', 'F', 'G']
var rangeD = 4..^4; // characterArray[rangeD] throws ArgumentOutOfRangeException

var rangeA2 = Range.EndAt(3);
var rangeB2 = Range.StartAt(3);
var rangeC2 = Range.All;
var rangeD2 = new Range(4, ^4);

var rangeA3 = ..3;
var rangeB3 = 3..;
var rangeC3 = ..;


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