Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0251.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a8c5ec30bc039957d88c6de7909b08694b8835ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// cs0251.cs: Indexing an array with a negative index (array indices always start at zero)
// Line: 10
// Compiler options: -warn:2 -warnaserror

class Main
{
    public int Method (int[] array)
    {
       const int index = 5;
       return array [index - 10];
    }
}