Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-429.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d4327e0ebb813255f881884e7e697c9369e22d2b (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;

public struct CInt
{
	int data;

	public CInt (int data)
	{
		this.data = data;
	}

	public static implicit operator CInt (int xx)
	{
		return new CInt (xx);
	}

	public static implicit operator int (CInt xx)
	{
		return xx.data;
	}
}


public class Klass
{
	public CInt? Value;
	public Klass (CInt? t)
	{
		this.Value = t;
	}
}

public class MainClass
{
	public static int Main ()
	{
		var v = new Klass (3);
		return v.Value.Value - 3;
	}
}