update readme (#21797)
[mono-project.git] / mcs / tests / test-943.cs
blobace5ef940b4f795d2efdf830dce8b22524dc05ce
1 using System;
2 using System.Runtime.InteropServices;
4 public struct MyStruct
6 public int X { get; set; }
9 [StructLayout (LayoutKind.Sequential, Pack = 1)]
10 public struct MyStruct2
12 public IntPtr handle;
13 public uint type_reference;
16 class X
18 public static int Main ()
20 var s = typeof (MyStruct);
22 if (s.StructLayoutAttribute.Size != 0)
23 return 1;
25 var s2 = typeof (MyStruct2);
27 if (s2.StructLayoutAttribute.Size != 0)
28 return 2;
30 if (s2.StructLayoutAttribute.Pack != 1)
31 return 3;
33 return 0;