private static unsafe void WriteFatMethodHeader(byte[] buffer, uint pos, FatMethodHeader header) { fixed(byte *p = buffer) { FatMethodHeader *ptr = (FatMethodHeader *)(p + pos); *ptr = header; } }
private static unsafe FatMethodHeader ReadFatMethodHeader(byte[] buffer, uint pos) { FatMethodHeader methodHeader = new FatMethodHeader(); fixed(byte *p = buffer) { FatMethodHeader *ptr = (FatMethodHeader *)(p + pos); methodHeader = *ptr; } return(methodHeader); }