2009-02-10 Jeffrey Stedfast <fejj@novell.com>
[mono-project/dkf.git] / mcs / tests / test-586.cs
blob328e3cea0ead9677b22a452cac7fedab8a59a0a4
1 class Program
3 static int Main ()
5 MyColor [] c = new MyColor [1];
6 c [0] += new MyColor (1.3F);
7 c [0] += new MyColor (1.5F);
8 if (c [0].Value != 2.8F)
9 return 1;
10 return 0;
13 public struct MyColor
15 private float _value;
17 public MyColor (float value)
19 _value = value;
22 public float Value
24 get { return _value; }
27 public static MyColor operator + (MyColor a, MyColor b)
29 return new MyColor (a._value + b._value);