Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created February 11, 2019 17:00
Show Gist options
  • Save dsibinski/92b499a8c0567c88001f7338d149c519 to your computer and use it in GitHub Desktop.
Save dsibinski/92b499a8c0567c88001f7338d149c519 to your computer and use it in GitHub Desktop.
var devs = new Developer[]
{
new Developer("Dawid"),
new Developer("Mark"),
new Developer("John"),
new Developer("Alice"),
new Developer("Kate")
};
foreach (var dev in devs[1..^2]) // prints "MarkJohn"
{
Console.Write(dev.FirstName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment