repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git]
/
mcs
/
tests
/
test-throw-expr-02.cs
blob
515d687ac625298644e1ff3a64e63a0599e60b2b
1
using
System
;
2
3
class
Program
4
{
5
public static int
Main
()
6
{
7
Console
.
WriteLine
(
M
(
1
));
8
try
{
9
Console
.
WriteLine
(
M
(
null
));
10
}
catch
(
Exception
) {
11
Console
.
WriteLine
(
"thrown"
);
12
return
0
;
13
}
14
15
return
1
;
16
}
17
18
static string
M
(
object
data
)
19
{
20
return
data
?.
ToString
() ??
throw null
;
21
}
22
}