私はprotobufを初めて使用し、Dictionaryから継承するクラスをシリアル化しようとすると問題が発生します。追加のプロパティはシリアル化されていません。例として、私はこのクラスを持っています
[ProtoContract]
public class InheritDictionary: Dictionary<string,string>
{
private int _myInt;
[ProtoMember(1)]
public int MyInt
{
get
{
return _myInt;
}
set
{
_myInt = value;
}
}
}
MyIntプロパティをシリアル化すると、含まれません。私は何かが足りないのですか?