Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / dtest-056.cs
1 using System;
2
3 public class C
4 {
5         public D D { get; private set; }
6         public string Value { get; private set; }
7         public Foo Foo { get; set; }
8
9         public int Test ()
10         {
11                 dynamic d = new C ();
12                 return D.Foo (d.Value);
13         }
14
15         public static int Test2 (dynamic d)
16         {
17                 return Foo.Method(d);
18         }
19
20         public static int Main ()
21         {
22                 var c = new C ();
23                 if (c.Test () != 1)
24                         return 1;
25
26                 if (C.Test2 ("s") != 1)
27                         return 2;
28                 
29                 return 0;
30         }
31 }
32
33 public struct D
34 {
35         public int Foo (string value)
36         {
37                 return 1;
38         }
39 }
40
41 public class Foo
42 {
43         public static int Method (string s)
44         {
45                 return 1;
46         }
47 }