当我尝试如下声明序列化程序时出现此错误。它返回错误,我不明白它的含义。
var serializer = MsgPack.Serialization.MessagePackSerializer.Create<data>();
下面是类定义。
using System;
using System.Collections.Generic;
using System.Text;
namespace TickDataDefinition
{
class data
{
private enum type { trade, quote }
private long time;
private double bid1;
private double ask1;
private double bidsize;
private double asksize;
private double price;
private uint size;
public data()
{
}
public data(long t, double b, double a, double bs, double ask)
{
time = t;
bid1 = b;
ask1 = a;
bidsize = bs;
asksize = ask;
}
public data(long t, double p, uint s)
{
time = t;
price = p;
size = s;
}
}
}