projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Allow passing null to JsonArray.Add()
[mono.git]
/
mcs
/
tests
/
gtest-429.cs
1
using System;
2
3
public struct CInt
4
{
5
int data;
6
7
public CInt (int data)
8
{
9
this.data = data;
10
}
11
12
public static implicit operator CInt (int xx)
13
{
14
return new CInt (xx);
15
}
16
17
public static implicit operator int (CInt xx)
18
{
19
return xx.data;
20
}
21
}
22
23
24
public class Klass
25
{
26
public CInt? Value;
27
public Klass (CInt? t)
28
{
29
this.Value = t;
30
}
31
}
32
33
public class MainClass
34
{
35
public static int Main ()
36
{
37
var v = new Klass (3);
38
return v.Value.Value - 3;
39
}
40
}