linux-packaging-mono/mcs/tests/gtest-optional-27.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

35 lines
390 B
C#

using System;
class EnumWrapperCtor<T>
{
public enum Test
{
Wrong,
MyDefault
}
readonly Test myVal;
public EnumWrapperCtor (Test value = Test.MyDefault)
{
myVal = value;
}
public Test getValue ()
{
return myVal;
}
}
public class C
{
public static int Main ()
{
var ew = new EnumWrapperCtor<int> ();
if ((int) ew.getValue () != 1)
return 1;
return 0;
}
}