Index was outside the bounds of the array how to resolve

check your split value of the line:

int num1 = checked (Convert.ToInt32(Strings.Split(Conversions.ToString(today), "https://stackoverflow.com/", -1, CompareMethod.Binary)[4]) - 4);

It is quite obvious by the exception message that the split did not return more than 5 items ( no 4 index)

Leave a Comment