📅  最后修改于: 2022-03-11 14:48:43.431000             🧑  作者: Mango
// Wraping around an array or list
currentIndex = (currentIndex + 1) % myList.Count; // Forward
currentIndex = (myList.Count + currentIndex - 1) % myList.Count; //Backward