linux-packaging-mono/mcs/tests/gtest-initialize-14.cs
Xamarin Public Jenkins c042cd0c52 Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
2015-11-10 15:03:43 +00:00

36 lines
335 B
C#

using System;
struct S
{
public int X, Y;
}
class X
{
public static int Main ()
{
var rect = new S {
X = 1,
Y = 2,
};
if (rect.X != 1)
return 1;
if (rect.Y != 2)
return 2;
rect = new S {
X = rect.X,
Y = rect.Y,
};
if (rect.X != 1)
return 3;
if (rect.Y != 2)
return 4;
return 0;
}
}