* AssemblyInfo.cs: Added InternalsVisibleTo attribute to support
[mono.git] / mcs / tests / gtest-anon-23.cs
1 // Cloning tests
2
3 using System;
4 using System.Collections.Generic;
5
6 class MemberAccessData
7 {
8         public volatile uint VolatileValue;
9         public string [] StringValues;
10         public List<string> ListValues;
11         
12         int? mt;
13         public int? MyTypeProperty {
14                 set     {
15                         mt = value;
16                 }
17                 get {
18                         return mt;
19                 }
20         }
21 }
22
23 public class C
24 {
25         delegate void D ();
26         
27         static void Test (D d)
28         {
29         }
30         
31         public static void Main ()
32         {
33                 Exception diffException;
34                 
35                 Test (() => {
36                         diffException = null;
37                                         try {
38                                         } catch (Exception ex) {
39                                                 diffException = ex;
40                                         } finally {
41                                         }
42                                         
43                                         try {
44                                         } catch {
45                                         }
46                                 });
47                                 
48                 int[] i_a = new int [] { 1,2,3 };
49                 
50                 Test (() => {
51                                 foreach (int t in i_a) {
52                                 }
53                         });
54                         
55                 Test (() => {
56                         Console.WriteLine (typeof (void));
57                 });
58                 
59                 Test (() => {
60                         Console.WriteLine (typeof (Func<,>));
61                 });
62                 
63                 Test (() => {
64                         object o = new List<object> { "Hello", "", null, "World", 5 };
65                 });
66                 
67                 Test (() => {
68                         var v = new MemberAccessData { 
69                                 VolatileValue = 2, StringValues = new string [] { "sv" }, MyTypeProperty = null
70                         };
71                 });
72         }
73 }