System.IndexOutOfRangeException HResult=0x80131508 Message=Index was outside the bounds of the array. Source=core4 StackTrace: at ConsoleApplication12.Program.Main(String[] args) in C:\Users\matan\source\repos\core4\core4\Program.cs:line 46 code example
Example: IndexOutOfRangeException in c#
int[] test = new int[3];
void Start()
{
test[1] = 5;
test[2] = 12;
test[3] = 7;/*this wil cause an errror
becase it has an size of 3, but the
array index starts with [0], so you
have to write test[0],test[1] and
test[2]*/
}