Skip to content

Instantly share code, notes, and snippets.

@cbuctok
Last active July 25, 2019 11:24
Show Gist options
  • Save cbuctok/97b62b8ff519efa6ed03617843d5f353 to your computer and use it in GitHub Desktop.
Save cbuctok/97b62b8ff519efa6ed03617843d5f353 to your computer and use it in GitHub Desktop.
Lists: next element or first
//element = list[index == -1 ? 0 : index % list.Count];
currentStep++;
Console.WriteLine($"{list[currentStep == -1 ? 0 : currentStep % list.Length]}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment