Is it possible to use protobuf with classes who inherit?
I want to do something like this
class Expr;
class AddExpr : Expr;
class CallFunc: Expr;
class FunctionBody{
repeatable Expr expr;
}
Is it possible to use protobuf with classes who inherit?
I want to do something like this
class Expr;
class AddExpr : Expr;
class CallFunc: Expr;
class FunctionBody{
repeatable Expr expr;
}
Not in the core implementation - you would want to use encapsulation instead.
However if you are using just protobuf-net, as code-first, I hack around it:
Of course, I'm assuming there is some additional detail in the classes - "as is" you could just use an enum (which is well-supported).