2007-05-25 Jonathan Chambers <joncham@gmail.com>
[mcs.git] / tests / gtest-136.cs
blobfbef3ced10b28139d88cb82e6094adba25554b15
1 using System;
3 namespace Martin {
4 public struct A
6 public readonly long Data;
8 public A (long data)
10 this.Data = data;
13 public static explicit operator B (A a)
15 return new B ((int) a.Data);
19 public struct B
21 public readonly int Data;
23 public B (int data)
25 this.Data = data;
28 public static implicit operator A (B b)
30 return new A (b.Data);
34 class X
36 static void Main ()
38 B? b = new B (5);
39 A? a = b;
40 B? c = (B?) a;
41 B? d = (Martin.B?) a;