Skip to content

Instantly share code, notes, and snippets.

@dsibinski

dsibinski/RangeCSharp8.cs

Last active Feb 11, 2019
Embed
What would you like to do?
var array = new[] { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' };
Range r = Range.Create(2, ^1); // range from 2nd to
// 1st element from the end
Console.WriteLine(array[r]); // prints "CDEFG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.