2015-04-07 09:35:12 +01:00
|
|
|
// Compiler options: -langversion:experimental
|
2014-08-13 10:39:27 +01:00
|
|
|
using System;
|
|
|
|
|
|
|
|
partial class Part
|
|
|
|
{
|
|
|
|
public Part (string s)
|
|
|
|
: this (5)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
partial class Part(int arg)
|
|
|
|
{
|
2014-09-04 09:07:35 +01:00
|
|
|
static int field = 7;
|
|
|
|
|
|
|
|
int Property { get; } = arg + field;
|
2014-08-13 10:39:27 +01:00
|
|
|
|
2014-09-04 09:07:35 +01:00
|
|
|
{
|
|
|
|
if (arg != 5)
|
|
|
|
throw new ApplicationException ("1");
|
|
|
|
|
|
|
|
if (Property != 12)
|
|
|
|
throw new ApplicationException ("2");
|
2014-08-13 10:39:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public static int Main ()
|
|
|
|
{
|
|
|
|
var p = new Part ("5");
|
|
|
|
if (p.Property != 12)
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|