public static unsafe void Convert(xxx *src, ulong *dest) { byte *pb = (byte *)dest; *dest = 0L; pb [0] = src->zzz [0]; pb [1] = src->zzz [1]; pb [2] = src->zzz [2]; pb [3] = src->zzz [3]; pb [4] = src->zzz [4]; }
public unsafe void CopyTo(xxx *dest) { fixed(ulong *p = &_rep) { byte *pb = (byte *)p; dest->zzz [0] = pb [0]; dest->zzz [1] = pb [1]; dest->zzz [2] = pb [2]; dest->zzz [3] = pb [3]; dest->zzz [4] = pb [4]; } }