projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* HttpChannel.cs, HttpClientChannel.cs, HttpHelper.cs, HttpServer.cs,
[mono.git]
/
mcs
/
tests
/
test-141.cs
1
using System;
2
3
class X {
4
public static int Main()
5
{
6
byte num1 = 105;
7
byte num2 = 150;
8
byte sum;
9
10
bool ok = false;
11
12
// should generate OverflowException
13
try {
14
checked {
15
sum = (byte) (num1 - num2);
16
}
17
} catch (OverflowException){
18
ok = true;
19
}
20
21
if (ok)
22
return 0;
23
return 1;
24
}
25
}