Skip to content

Instantly share code, notes, and snippets.

@christiannagel
Created July 10, 2018 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannagel/d877ebb8d3fdc8c62008bacc5f12ec6f to your computer and use it in GitHub Desktop.
Save christiannagel/d877ebb8d3fdc8c62008bacc5f12ec6f to your computer and use it in GitHub Desktop.
More range syntax with C# 8
string lazyDogs5 = text1[^9..]; // Range.FromStart
string lazyDogs6 = text1[36..]; // Range.FromStart
string thequick = text1[..9]; // Range.ToEnd
string completeString = text1[..]; // Range.All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment