blob: 712fd61d89914e841d5fb88efbebf98a7b3e12c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
using System;
class Test
{
public static int Main ()
{
dynamic index = (uint) int.MaxValue + 1;
dynamic array = new int[] { 1, 2 };
try {
var a = array [index];
return 1;
} catch (System.OverflowException) {
}
try {
array[ulong.MaxValue] = 1;
return 2;
} catch (System.OverflowException) {
}
return 0;
}
}
|