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
[eglib] In AIX/generic POSIX, handle null addresses better (#17892)
[mono-project.git]
/
mcs
/
tests
/
test-null-operator-23.cs
blob
558328a6ebf7e3e50df7f92720459d66fc1064ed
1
using
System
;
2
3
public class
X
4
{
5
string
field
;
6
7
public static int
Main
()
8
{
9
X x
=
null
;
10
11
try
{
12
var
res
= (
x
?.
field
).
ToString
()?.
Length
;
13
return
1
;
14
}
catch
(
NullReferenceException
) {
15
16
}
17
18
return
0
;
19
}
20
}