public unsafe Palette(PaletteEntry* p, int count) { Entries = new PaletteEntry[count]; // todo: memcpy fixed (PaletteEntry* pEntries = Entries) { for (int i = 0; i < count; i++) { pEntries[i] = *p; p += PaletteEntry.StructLength; } } }
public Palette(PaletteEntry[] entries) { if (entries == null) throw new ArgumentNullException("entries"); Entries = entries; }