public static void Populate(this ISerializable s, byte[] data) { using (var stream = new MemoryStream(data)) using (var r = new SerializationReader(stream)) s.ReadFromStream(r); }
public static void Populate(this ISerializable s, byte[] data) { using (MemoryStream stream = new MemoryStream(data)) using (PacketReader r = new PacketReader(stream)) s.ReadFromStream(r); }