2009-12-09 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-anon-23.cs
blob8c7bbb718d847bee7062d466755eed84622e4492
1 // Cloning tests
3 using System;
4 using System.Collections.Generic;
6 class MemberAccessData
8 public volatile uint VolatileValue;
9 public string [] StringValues;
10 public List<string> ListValues;
12 int? mt;
13 public int? MyTypeProperty {
14 set {
15 mt = value;
17 get {
18 return mt;
23 public class C
25 delegate void D ();
27 static void Test (D d)
31 public static void Main ()
33 Exception diffException;
35 Test (() => {
36 diffException = null;
37 try {
38 } catch (Exception ex) {
39 diffException = ex;
40 } finally {
43 try {
44 } catch {
46 });
48 int[] i_a = new int [] { 1,2,3 };
50 Test (() => {
51 foreach (int t in i_a) {
53 });
55 Test (() => {
56 Console.WriteLine (typeof (void));
57 });
59 Test (() => {
60 Console.WriteLine (typeof (Func<,>));
61 });
63 Test (() => {
64 object o = new List<object> { "Hello", "", null, "World", 5 };
65 });
67 Test (() => {
68 var v = new MemberAccessData {
69 VolatileValue = 2, StringValues = new string [] { "sv" }, MyTypeProperty = null
71 });