add SafeSerializationEventArgs
[mcs.git] / tests / gtest-353.cs
blobc122cc1fae3c3631573bf453f125ed3743d02b4c
1 // Compiler options: -unsafe
3 using System;
4 using System.Runtime.InteropServices;
6 namespace Bug
8 [StructLayout (LayoutKind.Sequential, Pack = 1)]
9 public unsafe struct xxx
11 internal fixed byte zzz [5];
14 internal class RedSkyTimeCode
16 public unsafe void CopyTo (xxx* dest)
18 fixed (ulong* p = &_rep) {
19 byte* pb = (byte*) p;
20 dest->zzz [0] = pb [0];
21 dest->zzz [1] = pb [1];
22 dest->zzz [2] = pb [2];
23 dest->zzz [3] = pb [3];
24 dest->zzz [4] = pb [4];
28 public static unsafe void Convert (xxx* src, ulong* dest)
30 byte* pb = (byte*) dest;
31 *dest = 0L;
32 pb [0] = src->zzz [0];
33 pb [1] = src->zzz [1];
34 pb [2] = src->zzz [2];
35 pb [3] = src->zzz [3];
36 pb [4] = src->zzz [4];
39 private ulong _rep;
41 public static void Main ()