Add information about IndexOutOfRangeException (#25072)
* Add information about IndexOutOfRangeException Added some information that explains what happens if an invalid index is used while working with arrays. * Fixed grammar, removed IndexOutOfRangeException
This commit is contained in:
@ -33,6 +33,7 @@ You can assign a value into an element directly by using the format below:
|
||||
|
||||
Code above will assign the value of 50 directly into element [2]
|
||||
|
||||
Note - Be careful when trying to assign/access a value to/from an array. If an invalid index isused, like `nameOfArray[-1]` you will encounter a run-time error.
|
||||
|
||||
You can assign multiple values at once while declaring the array using the format below:
|
||||
|
||||
|
Reference in New Issue
Block a user