2010-06-14 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / errors / cs0251.cs
bloba8c5ec30bc039957d88c6de7909b08694b8835ac
1 // cs0251.cs: Indexing an array with a negative index (array indices always start at zero)
2 // Line: 10
3 // Compiler options: -warn:2 -warnaserror
5 class Main
7 public int Method (int[] array)
9 const int index = 5;
10 return array [index - 10];