WikiCrawler/Utility/IListUtility.cs
/// <summary>
/// Wraps the specified index to keep it in the list's range.
/// </summary>
Wraps the specified index to keep it in the list's range.
Wraps the specified index to keep it in the list ' s range .
public static int WrapInRange<T>(this IList<T> list, int index)
	{
		return (index + list.Count) % list.Count;
	}
public static int WrapInRange < T > ( this IList < T > list , int index ) { return ( index + list . Count ) % list . Count ; }
Wraps the specified index to keep it in the list's range.
Wraps the specified index to keep it in the list ' s range .
//TODO: support larger negative indices
IList<T>
this
index
int