YAMP.SurfacePlotValue.Serialize C# (CSharp) Method

Serialize() public method

Converts the given instance to an array of bytes.
public Serialize ( ) : byte[]
return byte[]
        public override byte[] Serialize()
        {
            using (var s = Serializer.Create())
            {
                Serialize(s);
                s.Serialize(IsMesh);
                s.Serialize((int)ColorPalette);
                data.Serialize(s);
                s.Serialize(Count);

                for (int j = 0; j < Count; j++)
                {
                    s.Serialize(data[j].X);
                    s.Serialize(data[j].Y);
                    s.Serialize(data[j].Z);
                }

                return s.Value;
            }
        }