[2020-02] Avoid following invalid pointers in mono_w32process_get_modules on Darwin...
[mono-project.git] / mono / tests / generic-sizeof.2.cs
blob7db2227c33384c1263952ca44e2dc2cb8456a6bb
1 public class ClassA {}
2 public struct GenStruct<T> {
3 int field1;
4 long field2;
5 T field3;
7 public struct Struct {
8 int field1;
9 long field2;
10 byte field3;
13 public class Gen<T> {
14 public unsafe int sizeofGenStructT () { return sizeof (Struct); }
17 public class main {
18 public static unsafe int Main () {
19 Gen<ClassA> ga = new Gen<ClassA> ();
21 if (ga.sizeofGenStructT () != sizeof (Struct))
22 return 1;
24 return 0;