Merge pull request #4845 from lambdageek/dev-coop-delegates
[mono.git] / mcs / errors / cs0030-10.cs
1 // CS0030: Cannot convert type `TestCase.MyEnum' to `TestCase.OSType'
2 // Line: 9
3
4 public class TestCase
5 {
6         static void Main ()
7         {
8                 MyEnum me = MyEnum.Value1;
9                 OSType os = (OSType)me;
10         }
11
12         struct OSType {
13                 int value;
14                 
15                 public int Value {
16                         get { return Value; }
17                 }
18
19                 public OSType (int value)
20                 {
21                         this.value = value;
22                 }
23
24                 public static implicit operator OSType (int i)
25                 {
26                         return new OSType (i);
27                 }
28         }
29
30         enum MyEnum {
31                 Value1
32         }
33 }