public PBEReflectTypePacket_Hidden(PBEReflectTypePacket other)
 {
     using (var ms = new MemoryStream())
         using (var w = new EndianBinaryWriter(ms, encoding: EncodingType.UTF16))
         {
             w.Write(Code);
             w.Write((UserTrainer = other.UserTrainer).Id);
             w.Write(User = other.User);
             w.Write((TargetTrainer = other.TargetTrainer).Id);
             w.Write(Target = other.Target);
             Data           = new ReadOnlyCollection <byte>(ms.ToArray());
         }
 }
 public PBEReflectTypePacket_Hidden(PBEReflectTypePacket other)
 {
     if (other == null)
     {
         throw new ArgumentNullException(nameof(other));
     }
     using (var ms = new MemoryStream())
         using (var w = new EndianBinaryWriter(ms, encoding: EncodingType.UTF16))
         {
             w.Write(Code);
             w.Write((UserTrainer = other.UserTrainer).Id);
             w.Write(User = other.User);
             w.Write((TargetTrainer = other.TargetTrainer).Id);
             w.Write(Target = other.Target);
             Data           = new ReadOnlyCollection <byte>(ms.GetBuffer());
         }
 }