add ISafeSerializationData
[mcs.git] / tests / gtest-453.cs
blobaff1e9ee7f74969315791e96a29777a16bdf1b13
1 using System;
3 namespace Test
5 public enum Enum
7 One,
8 Two
11 class CompilerTest
13 public static int Main ()
15 ThisWorksFine ();
16 ThisDoesNotWork ();
17 return 0;
20 protected static int DoSomething<T> (string s, T t, ref T t2)
22 Console.WriteLine ("s={0}", s);
23 Console.WriteLine ("t={0}", t.ToString ());
24 Console.WriteLine ("t2={0}", t2.ToString ());
26 t2 = default (T);
27 return 0;
30 public static void ThisDoesNotWork ()
32 Enum? e = Enum.One;
33 DoSomething ("abc", Enum.Two, ref e);
36 public static void ThisWorksFine ()
38 Enum e = Enum.Two;
39 DoSomething ("abc", Enum.Two, ref e);
40 Console.WriteLine ("e={0}", e.ToString ());