From 731dda053998568390da64cbeed223a56241d0cf Mon Sep 17 00:00:00 2001 From: Evaldas Date: Sat, 15 Dec 2018 12:55:23 +0200 Subject: [PATCH] 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 --- guide/english/csharp/array/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guide/english/csharp/array/index.md b/guide/english/csharp/array/index.md index aab144e3f4..4bc30d92df 100644 --- a/guide/english/csharp/array/index.md +++ b/guide/english/csharp/array/index.md @@ -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: