BinaryFormatter bf = new BinaryFormatter();
using(MemoryStream stream=new MemoryStream())
{
bf.Serialize(stream, 坐标列表);
byte[] result = stream.ToArray();
}
反序列化
BinaryFormatter bf = new BinaryFormatter();
using (MemoryStream stream = new MemoryStream(接收到的字节数组))
{
List<Point> result = (List<Point>)bf.Deserialize(stream);
}