开发者

Serialization across projects with inheritance

I have a base class ("MyBaseClass") in a project called "BaseFramework" which is included in several solutions within the company. There are several derived class's in various projects throughout the company that inherit from "MyBaseClass". If开发者_如何学编程 I then create a List and add derived class's to it, it will not serialize. I realise that if I were attempting to serialize this list, and the base class and derived class were in the same project, I could simply apply the "XmlInclude" attribute to the base class and include all of the derived class's. This is however not possible across projects, because that would require a circular dependency. Is this possible to do?


If you are looking at sending stuff over network, then you should definitelly look into .Net XML Web Services.

http://www.youtube.com/watch?v=12PGpwy8SUY

http://msdn.microsoft.com/en-us/library/ms996507.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜